original_string: public function beforeSave(Event $event, Entity $entity, ArrayObject $options = null)
      {
          $this->_saveRevision($entity);
          $this->_ensureStatus($entity);
  
          return true;
      }
code: public function beforeSave(Event $event, Entity $entity, ArrayObject $options = null)
      {
          $this->_saveRevision($entity);
          $this->_ensureStatus($entity);
  
          return true;
      }
code_tokens: public function beforeSave ( Event $ event , Entity $ entity , ArrayObject $ options = null ) { $ this -> _saveRevision ( $ entity ) ; $ this -> _ensureStatus ( $ entity ) ; return true ; }
docstring: 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
docstring_tokens: This callback performs two action saving revisions and checking publishing constraints .