Esempio n. 1
0
 /**
  * Remove a given Object from the DB
  * @param String $table
  * @param \App\Component\Model $object
  */
 public static function delete($table, $object)
 {
     $collection = self::$database->{$table};
     $collection->remove($object->toArray());
 }
Esempio n. 2
0
 /**
  * Return all the Addresses corresponding to the query array
  * @param mixed $array
  * @return \App\Model\Address[]
  */
 public static function getBy($array)
 {
     return parent::getBy($array);
 }
Esempio n. 3
0
 /**
  * Save the current Menu
  */
 public function save()
 {
     foreach ($this->getMenuItems() as $item) {
         $item->setMenu($this);
         $item->save();
     }
     parent::save();
 }