module/Customize/src/Grid/Customize/Model/Rule/Mapper.php
public function findAllByRoot( $rootId  = null,
                                   $order   = null,
                                   $limit   = null,
                                   $offset  = null )
    {
        $select = $this->select();

        if ( empty( $rootId ) )
        {
            $where = array(
                new Predicate\IsNull( 'rootParagraphId' )
            );
        }
        else
        {
            $where = array(
                'rootParagraphId' => (int) $rootId,
            );
        }

        $select->where( $where )
               ->order( $order ?: array() )
               ->limit( $limit )
               ->offset( $offset );

        /* @var $result \Zend\Db\Adapter\Driver\ResultInterface */

        $return = array();
        $result = $this->sql()
                       ->prepareStatementForSqlObject( $select )
                       ->execute();

        foreach ( $result as $row )
        {
            $return[] = $this->selected( $row );
        }

        return $return;
    }
public function findAllByRoot( $rootId  = null,
                                   $order   = null,
                                   $limit   = null,
                                   $offset  = null )
    {
        $select = $this->select();

        if ( empty( $rootId ) )
        {
            $where = array(
                new Predicate\IsNull( 'rootParagraphId' )
            );
        }
        else
        {
            $where = array(
                'rootParagraphId' => (int) $rootId,
            );
        }

        $select->where( $where )
               ->order( $order ?: array() )
               ->limit( $limit )
               ->offset( $offset );

        /* @var $result \Zend\Db\Adapter\Driver\ResultInterface */

        $return = array();
        $result = $this->sql()
                       ->prepareStatementForSqlObject( $select )
                       ->execute();

        foreach ( $result as $row )
        {
            $return[] = $this->selected( $row );
        }

        return $return;
    }
public function findAllByRoot ( $ rootId = null , $ order = null , $ limit = null , $ offset = null ) { $ select = $ this -> select ( ) ; if ( empty ( $ rootId ) ) { $ where = array ( new Predicate \ IsNull ( 'rootParagraphId' ) ) ; } else { $ where = array ( 'rootParagraphId' => ( int ) $ rootId , ) ; } $ select -> where ( $ where ) -> order ( $ order ? : array ( ) ) -> limit ( $ limit ) -> offset ( $ offset ) ; /* @var $result \Zend\Db\Adapter\Driver\ResultInterface */ $ return = array ( ) ; $ result = $ this -> sql ( ) -> prepareStatementForSqlObject ( $ select ) -> execute ( ) ; foreach ( $ result as $ row ) { $ return [ ] = $ this -> selected ( $ row ) ; } return $ return ; }
Find all structure by rootId

@param null|int $rootId
@param null|array $order
@param null|int $limit
@param null|int $offset
@return \Customize\Model\Rule\Structure[]
Find all structure by rootId