public function find( $primaryKeys )
    {
        if ( is_array( $primaryKeys ) )
        {
            $primaryKeys = reset( $primaryKeys );
        }

        $rootId = ( (int) $primaryKeys ) ?: null;

        return $this->createStructure( array(
            'rootId'    => $rootId,
            'extra'     => $this->getExtraMapper()
                                ->findByRoot( $rootId ),
            'rules'     => $this->getRuleMapper()
                                ->findAllByRoot(
                                    $rootId,
                                    $this->getRuleOrder()
                                ),
        ) );
    }
public function find( $primaryKeys )
    {
        if ( is_array( $primaryKeys ) )
        {
            $primaryKeys = reset( $primaryKeys );
        }

        $rootId = ( (int) $primaryKeys ) ?: null;

        return $this->createStructure( array(
            'rootId'    => $rootId,
            'extra'     => $this->getExtraMapper()
                                ->findByRoot( $rootId ),
            'rules'     => $this->getRuleMapper()
                                ->findAllByRoot(
                                    $rootId,
                                    $this->getRuleOrder()
                                ),
        ) );
    }
public function find ( $ primaryKeys ) { if ( is_array ( $ primaryKeys ) ) { $ primaryKeys = reset ( $ primaryKeys ) ; } $ rootId = ( ( int ) $ primaryKeys ) ? : null ; return $ this -> createStructure ( array ( 'rootId' => $ rootId , 'extra' => $ this -> getExtraMapper ( ) -> findByRoot ( $ rootId ) , 'rules' => $ this -> getRuleMapper ( ) -> findAllByRoot ( $ rootId , $ this -> getRuleOrder ( ) ) , ) ) ; }
Find a structure by root paragraph id

@param   int|array   $primaryKeys
@return  Structure
Find a structure by root paragraph id