public function beforeSave(Event $event, Entity $entity, ArrayObject $options = null)
    {
        $this->_saveRevision($entity);
        $this->_ensureStatus($entity);

        return true;
    }
public function beforeSave(Event $event, Entity $entity, ArrayObject $options = null)
    {
        $this->_saveRevision($entity);
        $this->_ensureStatus($entity);

        return true;
    }
public function beforeSave ( Event $ event , Entity $ entity , ArrayObject $ options = null ) { $ this -> _saveRevision ( $ entity ) ; $ this -> _ensureStatus ( $ entity ) ; return true ; }
This callback performs two action, saving revisions and checking publishing
constraints.

- Saves a revision version of each content being saved if it has changed.

- Verifies the publishing status and forces to be "false" if use has no
publishing permissions for this content type.

@param \Cake\Event\Event $event The event that was triggered
@param \Content\Model\Entity\Content $entity The entity being saved
@param \ArrayObject $options Array of options
@return bool True on success
This callback performs two action saving revisions and checking publishing constraints .