Example #1
0
 /**
  * Finds a record with current criteria key and populates the object with its data.
  * Makes a copy of the data in the protected $_history array, to be able to detect changes
  * made after calling find().
  *
  * @param mixed Optional criteria. Can be primary key value or array of field=>value pairs.
  *
  * @return Minutes_Models_MinutesItem An instance of Minutes_Models_MinutesItem.
  */
 public function find($criteria = null)
 {
     $res = parent::find($criteria);
     // Make a backup of the initial data to compare against in save() method
     $this->_history = $this->_data;
     return $res;
 }
Example #2
0
 /**
  * Finds a record with current criteria key and populates the object with its data.
  * Makes a copy of the data in the protected $_history array, to be able to detect changes
  * made after calling find().
  *
  * @param mixed Optional criteria. Can be primary key value or array of field=>value pairs.
  *
  * @return Minutes_Models_MinutesItem An instance of Minutes_Models_MinutesItem.
  */
 public function find($criteria = null)
 {
     $res = parent::find($criteria);
     // Define the parent if is not set
     if (null === $this->getParent()) {
         $res->setParent($res->projectId);
     }
     // Make a backup of the initial data to compare against in save() method
     $this->_history = $this->_data;
     return $res;
 }