public function beforeSave(Event $event, FieldInstance $instance, ArrayObject $options = null)
    {
        $result = $instance->beforeAttach();
        if ($result === false) {
            return false;
        }

        return true;
    }
public function beforeSave(Event $event, FieldInstance $instance, ArrayObject $options = null)
    {
        $result = $instance->beforeAttach();
        if ($result === false) {
            return false;
        }

        return true;
    }
public function beforeSave ( Event $ event , FieldInstance $ instance , ArrayObject $ options = null ) { $ result = $ instance -> beforeAttach ( ) ; if ( $ result === false ) { return false ; } return true ; }
Triggers the callback "beforeAttach" if a new instance is being created.

@param \Cake\Event\Event $event The event that was triggered
@param \Field\Model\Entity\FieldInstance $instance The Field Instance that is going to be saved
@param \ArrayObject  $options The options passed to the save method
@return bool False if save operation should not continue, true otherwise
Triggers the callback beforeAttach if a new instance is being created .