本文整理汇总了PHP中SEFTools::getExtParamsForm方法的典型用法代码示例。如果您正苦于以下问题:PHP SEFTools::getExtParamsForm方法的具体用法?PHP SEFTools::getExtParamsForm怎么用?PHP SEFTools::getExtParamsForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SEFTools
的用法示例。
在下文中一共展示了SEFTools::getExtParamsForm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getExtension
function getExtension()
{
// Load the data
if (empty($this->_extension)) {
$query = $this->_db->getQuery(true);
$query->select('*')->from('#__extensions')->where('state>=0')->where('enabled=1')->where('type=' . $this->_db->quote('sef_ext'))->where('element=' . $this->_db->quote($this->_id));
$this->_db->setQuery($query);
$row = $this->_db->loadObject();
if (is_null($row)) {
$row = new stdClass();
}
$option = str_replace('ext_joomsef4_', 'com_', $this->_id);
// Try to load language file for this extension
$langFile = str_replace('com_', 'sef_ext_', $option);
$lang = JFactory::getLanguage();
$lang->load($langFile, JPATH_ADMINISTRATOR);
$row->id = $this->_id;
$row->description = '';
$row->name = '';
$row->version = '';
$row->params =& SEFTools::getExtParams($option);
$row->form =& SEFTools::getExtParamsForm($option);
$row->option = $option;
$xml = SEFTools::getExtXML($option);
if ($xml) {
$version = (string) $xml['version'];
if ($xml->getName() == 'extension' && version_compare($version, '1.6', '>=') && (string) $xml['type'] == 'sef_ext') {
$element = $xml->description;
$row->description = $element ? trim((string) $element) : '';
$element = $xml->name;
$row->name = $element ? trim((string) $element) : '';
$element = $xml->version;
$row->version = $element ? trim((string) $element) : '';
}
}
// Get the component for this extension
$model = SEFModel::getInstance('Extensions', 'SEFModel');
$row->component = $model->_getComponent($option);
$this->_extension = $row;
}
return $this->_extension;
}