示例#1
0
 /**
  * Triggered before block is persisted in DB.
  *
  * @param \Cake\Event\Event $event The event that was triggered
  * @param \Block\Model\Entity\Block $block The block entity being saved
  * @param \ArrayObject $options Additional options given as an array
  * @return bool False if save operation should not continue, true otherwise
  */
 public function beforeSave(Event $event, Block $block, ArrayObject $options = null)
 {
     $result = $block->beforeSave();
     if ($result === false) {
         return false;
     }
     return true;
 }