I want something like this:
$page->image->action('param');
When I call method action() i want read settings saved with my ExtendedInputImageField field. Then i want perform action based on that settings.
I have first part. I can save EntendedInputImageField settings when I configure new field.
In this way I save the settings:
<?php
public function ___getConfigInputfields() {
$inputfields = parent::___getConfigInputfields();
//[...]
$field = $this->modules->get("InputfieldTextarea");
$field->attr('name', 'advSetting');
$field->attr('value', $this->advSetting? (string) $this->advSetting : '');
$field->label = $this->_("Advenced Settings");
$field->description ='';
$fieldset->add($field);
//[...]
$inputfields->add($fieldset);
return $inputfields;
}
Pageimage::action Hook
class FieldtypeExtendedImage extends FieldtypeImage {
// [...]
public function init() {
$this->addHook('Pageimage::action', $this, 'action');
}
public function action(HookEvent $event) {
// How can I read 'advSetting' settings here?
}
//[...]
}













