Location: PHPKode > projects > Agile Toolkit > atk4-atk4-addons-5a69383/hierarchy/lib/Model/Hierarchy.php
<?php
/**
 * A handy model for your hierarchy structure. Extend and define $table as well as add any fields you need
 *
 * You can also use Hierarchy controller with any other model you have
 */
namespace hierarchy;
class Model_Hierarchy extends \Model_Table {
    function init(){
        parent::init();

        $this->setController('hierarchy/Table')     // Hierarchy controller for Table model
            ->useField('parent_id');                // Referencing ourselves
    }
}
Return current item: Agile Toolkit