'key', 'slug'=>'string', 'label'=>'longstring', 'parent'=>'int', 'state'=>'int' ); function __construct(){ parent::__construct(); } public static function childs($slug,$sort='label ASC'){ $obj = new self(); $childs = array(); $parent = $obj->load(array('slug'=>$slug)); if(!$parent) return $childs; foreach($obj->loadAll(array('parent'=>$parent->id),$sort) as $child) $childs[$child->id] = $child; return $childs; } public static function table($slug){ $obj = new self(); $parent = $obj->load(array('slug'=>$slug)); echo '
'.$parent->label.'
Ajouter :
{{label}}
'; } } ?>