/** * Display an automatic SingleView of the object, based on the displayOnSingleView param of each vars * * @param bool $fetchOnly if set to TRUE, then the content will be return, if set to FALSE, the content will be outputed * @param bool $userSide for futur use, to do something different on the user side * @return content of the template if $fetchOnly or nothing if !$fetchOnly */ public function displaySingleObject($fetchOnly = false, $userSide = false, $actions = array(), $headerAsRow = true) { $singleview = new icms_ipf_view_Single($this, $userSide, $actions, $headerAsRow); // add all fields mark as displayOnSingleView except the keyid foreach ($this->vars as $key => $var) { if ($key != $this->handler->keyName && $var['displayOnSingleView']) { $is_header = $key == $this->handler->identifierName; $singleview->addRow(new icms_ipf_view_Row($key, false, $is_header)); } } if ($fetchOnly) { $ret = $singleview->render($fetchOnly); return $ret; } else { $singleview->render($fetchOnly); } }
public function __construct(&$object, $userSide = false, $actions = array(), $headerAsRow = true) { parent::__construct(&$object, $userSide, $actions, $headerAsRow); $this->_deprecated = icms_core_Debug::setDeprecated('icms_ipf_view_Single', sprintf(_CORE_REMOVE_IN_VERSION, '1.4')); }