Exemplo n.º 1
0
 /**
  * Adds a model to this collection
  *
  * @param [stdClass] $model_data Data to feed into attributes of new model
  * @param [array]    $options    Data to make properties of the new model
  * @return [void]
  */
 protected function add($model_data, $options = array())
 {
     parent::add($model_data->attributes, $options);
 }
Exemplo n.º 2
0
 /**
  * Adds a model to this collection
  *
  * @param [stdClass] $model_data Data to feed into attributes of new model
  * @param [array]    $options    Data to make properties of the new model
  * @return [mixed] $model newly added model
  */
 protected function add($model_data, $options = array())
 {
     $model = parent::add($model_data, $options = array());
     $model->owner = $this->owner;
     return $model;
 }
Exemplo n.º 3
0
 /**
  * Adds a model to this collection
  *
  * @param object $model_data Data to feed into attributes of new model
  * @param array  $options    Data to make properties of the new model
  * @return void
  */
 public function add($model_data, array $options = array())
 {
     parent::add($model_data->attributes, $options);
 }
Exemplo n.º 4
0
 /**
  * Adds a model to this collection
  *
  * @param object $model_data Data to feed into attributes of new model
  * @param array  $options    Data to make properties of the new model
  * @return Workflow  The newly-added model
  */
 public function add($model_data, array $options = array())
 {
     $model = parent::add($model_data, $options);
     $model->owner = $this->owner;
     return $model;
 }