public static function renderUI($action) { $action->user_id = $action->getUser()->getAppFlowerUser()->getId(); if (class_exists("GraphUtil")) { $setting = GraphUtil::getDefaultSettingByName($action->name); } $action->id = ''; $c = new Criteria(); $c->add(afWidgetSettingPeer::USER, $action->user_id); $c->add(afWidgetSettingPeer::NAME, $action->name); $obj = afWidgetSettingPeer::doSelectOne($c); if ($obj) { $action->id = $obj->getId(); $setting = json_decode($obj->getSetting(), true); } $varHolder = array(); if (is_array($setting)) { foreach ($setting as $k => $v) { if (is_array($v)) { foreach ($v as $kk => $vv) { $varHolder[$k . "_" . $kk] = $vv; } } else { $varHolder[$k] = $v; } } } $action->getVarHolder()->add($varHolder); return XmlParser::layoutExt($action); }
protected function layoutExtIfNeeded($actionInstance) { $viewName = sfView::SUCCESS; if (XmlParser::isLayoutStarted()) { return $viewName; } if ($this->isAppFlowerAction($actionInstance)) { $viewName = XmlParser::layoutExt($actionInstance); } return $viewName; }
public function executeIndex() { return XmlParser::layoutExt($this); }