1

It is possible to get the field settings via ElementInterface in normalizeValue Method ?

I need these settings of my custom field from my plugin :

I need the type and shop value.

how i can get now these values inside normalizeValue ?

public function normalizeValue($value, ElementInterface $element = null)
{
    $type = $element; // Here comes the value of field settings (Type)
    $shops = $element; // Here comes the value of field settings (Shop)
    
    ...
    return;
}
0

1 Answer 1

3

I found the solution the values are stored in $this:

public function normalizeValue($value, ElementInterface $element = null)
{
   $type = $this->type; 
   $shops = $this->shop;

   ...
   return;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.