/** * 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()); }
/** * 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); }
/** * Save the current Menu */ public function save() { foreach ($this->getMenuItems() as $item) { $item->setMenu($this); $item->save(); } parent::save(); }