本文整理匯總了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);
}