Contao\Database\Result::row PHP Method

row() public method

Return the current row as associative array
public row ( boolean $blnEnumerated = false ) : array
$blnEnumerated boolean If true, an enumerated array will be returned
return array The row as array
    public function row($blnEnumerated = false)
    {
        if (empty($this->arrCache)) {
            $this->next();
        }
        return $blnEnumerated ? array_values($this->arrCache) : $this->arrCache;
    }

Usage Example

Beispiel #1
0
 /**
  * Add the table tl_theme
  *
  * @param \DOMDocument           $xml
  * @param \DOMNode|\DOMElement   $tables
  * @param Database\Result|object $objTheme
  */
 protected function addTableTlTheme(\DOMDocument $xml, \DOMNode $tables, Database\Result $objTheme)
 {
     // Add the table
     $table = $xml->createElement('table');
     $table->setAttribute('name', 'tl_theme');
     $table = $tables->appendChild($table);
     // Load the DCA
     $this->loadDataContainer('tl_theme');
     // Get the order fields
     $objDcaExtractor = \DcaExtractor::getInstance('tl_theme');
     $arrOrder = $objDcaExtractor->getOrderFields();
     // Add the row
     $this->addDataRow($xml, $table, $objTheme->row(), $arrOrder);
 }
All Usage Examples Of Contao\Database\Result::row