Ejemplo n.º 1
0
 public static function render(array $parameters)
 {
     // Sets Defaults
     $parameters = array_merge(self::$defaultParameters, $parameters);
     // Begins widget
     $xmlOutput = parent::begin($parameters['class']);
     // Renders model table recursively
     $xmlOutput .= DataCenterXml::table(DataCenterXml::headingCell(array('align' => 'left'), DataCenterUI::message('field', 'name')) . DataCenterXml::headingCell(array('align' => 'right'), DataCenterUI::message('field', 'quantity')) . DataCenterXml::headingCell(array('align' => 'left'), DataCenterUI::message('field', 'model')) . DataCenterXml::headingCell(array('align' => 'left'), DataCenterUI::message('field', 'type')) . self::renderModel($parameters, $parameters['model']->getStructure()));
     // Clears any floating
     $xmlOutput .= DataCenterXml::div(array('style' => 'clear:both'), ' ');
     // Ends widget
     $xmlOutput .= parent::end();
     // Returns results
     return $xmlOutput;
 }