本文整理汇总了PHP中FlexicontentFields::createItemsListSQL方法的典型用法代码示例。如果您正苦于以下问题:PHP FlexicontentFields::createItemsListSQL方法的具体用法?PHP FlexicontentFields::createItemsListSQL怎么用?PHP FlexicontentFields::createItemsListSQL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FlexicontentFields
的用法示例。
在下文中一共展示了FlexicontentFields::createItemsListSQL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getItemsList
static function getItemsList(&$params, &$_item_data = null, $isform = 0, $reverse_field = 0, &$parentfield, &$parentitem, &$return_item_list = false)
{
// Execute query to get item list data
$db = JFactory::getDBO();
$query = FlexicontentFields::createItemsListSQL($params, $_item_data, $isform, $reverse_field, $parentfield, $parentitem);
$db->setQuery($query);
$item_list = $db->loadObjectList('id');
if ($db->getErrorNum()) {
JFactory::getApplication()->enqueueMessage(__FUNCTION__ . '(): SQL QUERY ERROR:<br/>' . nl2br($db->getErrorMsg()), 'error');
}
// Item list must be returned too ...
if ($return_item_list) {
$return_item_list =& $item_list;
}
// No published related items or SQL query failed, return
if (!$item_list) {
return '';
}
if ($_item_data) {
foreach ($item_list as $_item) {
// if it exists ... add prefered catid to items list data
$_item->rel_catid = @$_item_data[$_item->id]->catid;
}
}
return FlexicontentFields::createItemsListHTML($params, $item_list, $isform, $parentfield, $parentitem, $_item_data);
}
示例2: getItemsList
static function getItemsList(&$params, &$_item_data = null, $isform = 0, $reverse_field = 0, &$parentfield, &$parentitem, &$return_item_list = false, $states = array(1, -5, 2))
{
// Execute query to get item list data
$db = JFactory::getDBO();
$query = FlexicontentFields::createItemsListSQL($params, $_item_data, $isform, $reverse_field, $parentfield, $parentitem, $states);
$db->setQuery($query);
try {
$item_list = $db->loadObjectList('id');
} catch (Exception $e) {
JFactory::getApplication()->enqueueMessage(__FUNCTION__ . '(): SQL QUERY ERROR:<br/>' . nl2br(JDEBUG ? $e->getMessage() : 'Joomla Debug is OFF'), 'warning');
}
// Return item ids list instead of rendering their HTML
if ($return_item_list) {
$return_item_list =& $item_list;
}
// No published related items or SQL query failed, return
if (!$item_list) {
return '';
}
if ($_item_data) {
foreach ($item_list as $_item) {
// if it exists ... add prefered catid to items list data
$_item->rel_catid = @$_item_data[$_item->id]->catid;
}
}
return FlexicontentFields::createItemsListHTML($params, $item_list, $isform, $parentfield, $parentitem, $_item_data);
}