Application\Model\Test\Category::__construct PHP Method

__construct() public method

public __construct ( $attributes = [] )
    public function __construct($attributes = array())
    {
        parent::__construct(array('hasMany' => array('products' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category'), 'products_starting_with_b' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => "products.name LIKE 'b%'"), 'products_ending_with_b_or_y' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => function () {
            return WhereClause::create("products.name LIKE ? OR products.name LIKE ?", array('%b', '%y'));
        }), 'products_name_bob' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => array("products.name" => "bob")), 'products_ordered_by_name' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'order' => array("products.name ASC"))), 'hasOne' => array('product_named_billy' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => "products.name = 'billy'")), 'belongsTo' => array('parent' => array('class' => 'Test\\Category', 'foreignKey' => 'id_parent', 'referencedColumn' => 'id')), 'attributes' => $attributes, 'fields' => $this->_fields));
    }