public function generateTable(BeanInterface $bean, $findCondition = "", $returnString = false)
    {
        //Load the config
        $this->loadConfig();
        if((is_array($findCondition) && !isset($findCondition['limit'])) || empty($findCondition))
        {
            $recordLimitOnOnePage = $this->getConfigForElement($this->_table_config, 'recordLimitOnOnePage', $bean->getName(), 'beans');
            if (empty($recordLimitOnOnePage)) {
                $recordLimitOnOnePage = 10;
            }

            $findCondition['limit'] = $recordLimitOnOnePage;
        }

        $result = $bean->find($findCondition, true);

        if ($returnString) {
            return $this->generateTableHtml($bean, $result);
        }

        echo $this->generateTableHtml($bean, $result);
    }
public function generateTable(BeanInterface $bean, $findCondition = "", $returnString = false)
    {
        //Load the config
        $this->loadConfig();
        if((is_array($findCondition) && !isset($findCondition['limit'])) || empty($findCondition))
        {
            $recordLimitOnOnePage = $this->getConfigForElement($this->_table_config, 'recordLimitOnOnePage', $bean->getName(), 'beans');
            if (empty($recordLimitOnOnePage)) {
                $recordLimitOnOnePage = 10;
            }

            $findCondition['limit'] = $recordLimitOnOnePage;
        }

        $result = $bean->find($findCondition, true);

        if ($returnString) {
            return $this->generateTableHtml($bean, $result);
        }

        echo $this->generateTableHtml($bean, $result);
    }
public function generateTable ( BeanInterface $ bean , $ findCondition = "" , $ returnString = false ) { //Load the config $ this -> loadConfig ( ) ; if ( ( is_array ( $ findCondition ) && ! isset ( $ findCondition [ 'limit' ] ) ) || empty ( $ findCondition ) ) { $ recordLimitOnOnePage = $ this -> getConfigForElement ( $ this -> _table_config , 'recordLimitOnOnePage' , $ bean -> getName ( ) , 'beans' ) ; if ( empty ( $ recordLimitOnOnePage ) ) { $ recordLimitOnOnePage = 10 ; } $ findCondition [ 'limit' ] = $ recordLimitOnOnePage ; } $ result = $ bean -> find ( $ findCondition , true ) ; if ( $ returnString ) { return $ this -> generateTableHtml ( $ bean , $ result ) ; } echo $ this -> generateTableHtml ( $ bean , $ result ) ; }
This function generates the table with the Bean and findCondition is passed.

@param BeanInterface $bean
@param string $findCondition
@param bool|false $returnString

@return string
This function generates the table with the Bean and findCondition is passed .