本文整理汇总了PHP中Datasource::processParameters方法的典型用法代码示例。如果您正苦于以下问题:PHP Datasource::processParameters方法的具体用法?PHP Datasource::processParameters怎么用?PHP Datasource::processParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Datasource
的用法示例。
在下文中一共展示了Datasource::processParameters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processParameters
/**
* Process the page's parameters. This is used to extract the page id
* and set the associated data source to the id of the Page Fields section
* for it.
*
* @param array env The parameters.
*/
function processParameters($env = NULL)
{
// Get the handle of the PF section associated with the page.
//
$pageId = $env['param']['current-page-id'];
$pageFieldsSectionHandle = Lang::createHandle(PF_SECTION_TITLE_PREFIX . $pageId);
// Retrieve and store the Id of the section so we can return it from getSource()
//
$sectionManager = new SectionManager($this->_Parent);
$this->pageFieldsSectionId = $sectionManager->fetchIDFromHandle($pageFieldsSectionHandle);
// Initialise $dsParamINCLUDEDELEMENTS with the names of all fields for the section.
//
$fieldNames = $this->_Parent->Database->fetchCol('element_name', "SELECT `element_name` FROM `tbl_fields` WHERE `parent_section` = '{$this->pageFieldsSectionId}'");
$this->dsParamINCLUDEDELEMENTS = array();
if (is_array($fieldNames) && !empty($fieldNames)) {
foreach ($fieldNames as $elementName) {
$this->dsParamINCLUDEDELEMENTS[] = $elementName;
}
}
// Call parent class implementation.
//
parent::processParameters($env);
}