本文整理汇总了PHP中XmlParser::instance方法的典型用法代码示例。如果您正苦于以下问题:PHP XmlParser::instance方法的具体用法?PHP XmlParser::instance怎么用?PHP XmlParser::instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XmlParser
的用法示例。
在下文中一共展示了XmlParser::instance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postProcess
//.........这里部分代码省略.........
$icon = "/images/famfamfam/arrow_right.png";
} else {
if ($key == "Previous") {
$icon = "/images/famfamfam/arrow_left.png";
} else {
$icon = "/images/famfamfam/accept.png";
}
}
if (isset($this->page["actions"][$key])) {
/*
* Find if grid data save request
*/
$preExecute = '';
//$file = 'appFlowerPlugin/js/custom/'.self::isRequest($this->page["actions"][$key]["attributes"]["url"],'js').".js";
$file = '';
if (isset($this->page["actions"][$key]["attributes"]["script"])) {
if (file_exists(sfConfig::get('sf_root_dir') . "/plugins/appFlowerPlugin/web/js/custom/" . $this->page["actions"][$key]["attributes"]["script"] . ".js")) {
$file = 'appFlowerPlugin/js/custom/' . $this->page["actions"][$key]["attributes"]["script"] . ".js";
} else {
$file = '/js/custom/' . $this->page["actions"][$key]["attributes"]["script"] . ".js";
}
}
$preExecute = $file;
if ($this->page["actions"][$key]["attributes"]["post"] === "false" || !$value) {
new afExtjsLinkButton($this->layout, array('preExecute' => $preExecute, 'label' => $key, 'loadas' => 'page', 'url' => $this->page["actions"][$key]["attributes"]["url"], 'icon' => isset($icon) ? $icon : $this->page["actions"][$key]["attributes"]["icon"]));
} else {
$wizardSubmit = ArrayUtil::get($parse, 'params', 'wizard_submit', 'true') === 'true';
new afExtjsSubmitButton($this->layout, array('wizard' => $wizardSubmit, 'preExecute' => $preExecute, 'label' => $key, 'icon' => isset($icon) ? $icon : "/images/famfamfam/accept.png", 'action' => $this->page["actions"][$key]["attributes"]["url"]), $this->forms[0]);
}
}
}
if (!$finish && isset($this->attribute_holder["last"])) {
$id = '';
if (isset($this->attribute_holder["id"])) {
$id = $this->attribute_holder["id"];
}
new afExtjsSubmitButton($this->layout, array('wizard' => true, 'label' => 'Finish', 'action' => "/wizard/finalize?last=" . $this->current . "&end=" . urlencode($this->attribute_holder['end']) . "&id=" . $id . "&add=" . $add), $this->forms[0]);
}
}
if ($this->type == self::PAGE) {
if ($this->portalStateObj->getLayoutType() == afPortalStatePeer::TYPE_TABBED) {
$content = $this->portalStateObj->getContent();
foreach ($content as $item => $itemDetails) {
$portalLayoutType = $this->portalStateObj->getPortalLayoutType($item);
$portalColumns = $this->portalStateObj->getColumns($item);
$portalColumnsSize = $this->portalStateObj->getColumnsSize($item);
${'tab' . $item} = $this->layout->startTab(array('title' => isset($itemDetails["tabTitle"]) ? $itemDetails["tabTitle"] : $itemDetails["portalTitle"], 'portalLayoutType' => $portalLayoutType, 'portalWidgets' => $this->filterWidgets($item, $content, $this->widgets)));
foreach ($portalColumns as $k => $widgets) {
//instanciate a column
${'column' . $k} = ${'tab' . $item}->startColumn(array('columnWidth' => $portalColumnsSize[$k] / 100));
foreach ($widgets as $widget) {
if (isset($this->extobjects[$widget->idxml])) {
${'column' . $k}->addItem($this->extobjects[$widget->idxml]);
}
}
//end the instanciation of a column
${'tab' . $item}->endColumn(${'column' . $k});
}
$this->layout->endTab(${'tab' . $item});
}
} else {
foreach ($this->portalColumns as $k => $widgets) {
//instanciate a column
${'column' . $k} = $this->layout->startColumn(array('columnWidth' => $this->portalColumnsSize[$k] / 100));
foreach ($widgets as $widget) {
if (isset($this->extobjects[$widget->idxml])) {
${'column' . $k}->addItem($this->extobjects[$widget->idxml]);
}
}
//end the instanciation of a column
$this->layout->endColumn(${'column' . $k});
}
}
}
if ($this->multi) {
self::$instance = null;
}
if ($build) {
$this->result = $grid;
}
$layout_items = afExtjs::getInstance()->private;
if (is_array($layout_items)) {
$gridNames = $formIds = array();
foreach ($layout_items as $privateName => $it) {
if (preg_match("/bindForm: ([0-9]+),/", $it, $match)) {
$gridNames[$privateName] = trim($match[1]);
}
if (preg_match("/^form_[0-9a-zA-Z]+\$/", $privateName)) {
$formIds[] = $privateName;
}
}
foreach ($gridNames as $privateName => $fid) {
if (isset($formIds[$fid])) {
$layout_items[$privateName] = str_replace("bindForm: " . $fid . ",", "bindForm: '" . $formIds[$fid] . "',", $layout_items[$privateName]);
}
}
afExtjs::$instance->private = $layout_items;
}
return true;
}