本文整理汇总了PHP中JUDirectoryHelper类的典型用法代码示例。如果您正苦于以下问题:PHP JUDirectoryHelper类的具体用法?PHP JUDirectoryHelper怎么用?PHP JUDirectoryHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JUDirectoryHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: approve
function approve($comment_ids)
{
if (!is_array($comment_ids) || empty($comment_ids)) {
$this->setError('COM_JUDIRECTORY_NO_ITEM_SELECTED');
return false;
}
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_judirectory/tables');
$comment_table = JTable::getInstance("Comment", "JUDirectoryTable");
$count = 0;
$comment_ids = (array) $comment_ids;
$rootComment = JUDirectoryFrontHelperComment::getRootComment();
$listingIds = array();
foreach ($comment_ids as $comment_id) {
$comment_table->reset();
if ($comment_table->load($comment_id) && $comment_table->parent_id == $rootComment->id && $comment_table->approved == 0) {
$listingIds[$comment_table->listing_id] = $comment_table->listing_id;
}
$user = JFactory::getUser();
$date = JFactory::getDate();
$comment_table->approved = 1;
$comment_table->published = 1;
$comment_table->approved_by = $user->id;
$comment_table->approved_time = $date->toSql();
$comment_table->store();
$count++;
JUDirectoryFrontHelperMail::sendEmailByEvent('comment.approve', $comment_id);
$logData = array('user_id' => $comment_table->user_id, 'event' => 'comment.approve', 'item_id' => $comment_id, 'listing_id' => $comment_table->listing_id, 'value' => 0, 'reference' => '');
JUDirectoryFrontHelperLog::addLog($logData);
}
foreach ($listingIds as $listingId) {
JUDirectoryHelper::rebuildRating($listingId);
}
return $count;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:34,代码来源:pendingcomment.php
示例2: getOptions
protected function getOptions()
{
$app = JFactory::getApplication();
$view = $app->input->getCmd('view', '');
$options = array();
foreach ($this->element->children() as $option) {
if ($option->getName() != 'option') {
continue;
}
$tmp = JHtml::_('select.option', (string) $option['value'], JText::alt(trim((string) $option), preg_replace('/[^a-zA-Z0-9_\\-]/', '_', $this->fieldname)), 'value', 'text', (string) $option['disabled'] == 'true');
$tmp->class = (string) $option['class'];
$tmp->onclick = (string) $option['onclick'];
$options[] = $tmp;
}
JLoader::register('JUDirectoryHelper', JPATH_ADMINISTRATOR . '/components/com_judirectory/helpers/judirectory.php', false);
$checkPublished = $this->element['checkpublished'] == 'true' || $this->element['checkpublished'] == '1' ? true : false;
$getSelf = $this->element['fetchself'] == 'true' || $this->element['fetchself'] == '1' ? true : false;
$parentId = $this->element['parentid'] ? $this->element['parentid'] : 1;
$startLevel = $this->element['startlevel'] ? $this->element['startlevel'] : 0;
$separation = $this->element['separation'] ? $this->element['separation'] : '|—';
$ignoreaddress = $this->element['ignoreaddress'] ? explode(',', $this->element['ignoreaddress']) : array();
if ($view == 'address') {
$addressId = $app->input->get('id', 0);
$ignoreaddress = $addressId ? array($addressId) : array();
$_options = JUDirectoryHelper::getAddressOptions($parentId, $getSelf, $checkPublished, $ignoreaddress, $startLevel, $separation);
} else {
$_options = JUDirectoryHelper::getAddressOptions($parentId, $getSelf, $checkPublished, $ignoreaddress, $startLevel, $separation);
}
reset($options);
$options = array_merge($options, $_options);
return $options;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:32,代码来源:addresstree.php
示例3: populateState
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication();
$catId = $app->input->getInt('id', 1);
$params = JUDirectoryHelper::getParams($catId);
$this->setState('params', $params);
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:7,代码来源:categories.php
示例4: display
public function display($tpl = null)
{
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode('<br />', $errors));
return false;
}
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->canDo = JUDirectoryHelper::getActions('com_judirectory');
$this->addToolBar();
if (JUDirectoryHelper::isJoomla3x()) {
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
}
$options = array();
$options[] = JHtml::_('select.option', '1', JText::_('J1'));
$options[] = JHtml::_('select.option', '2', JText::_('J2'));
$options[] = JHtml::_('select.option', '3', JText::_('J3'));
$options[] = JHtml::_('select.option', '4', JText::_('J4'));
$options[] = JHtml::_('select.option', '5', JText::_('J5'));
$options[] = JHtml::_('select.option', '6', JText::_('J6'));
$options[] = JHtml::_('select.option', '7', JText::_('J7'));
$options[] = JHtml::_('select.option', '8', JText::_('J8'));
$options[] = JHtml::_('select.option', '9', JText::_('J9'));
$options[] = JHtml::_('select.option', '10', JText::_('J10'));
$this->f_levels = $options;
$optionsPublished = array();
$optionsPublished[] = JHtml::_('select.option', '1', JText::_('COM_JUDIRECTORY_PUBLISHED'));
$optionsPublished[] = JHtml::_('select.option', '0', JText::_('COM_JUDIRECTORY_UNPUBLISHED'));
$this->published_options = $optionsPublished;
parent::display($tpl);
$this->setDocument();
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:34,代码来源:view.html.php
示例5: rebuildCommentTree
public function rebuildCommentTree()
{
$model = $this->getModel();
JUDirectoryHelper::obCleanData();
echo $model->rebuildCommentTree();
exit;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:7,代码来源:tools.php
示例6: canView
public function canView($options = array())
{
$storeId = md5(__METHOD__ . "::" . $this->listing_id . "::" . $this->id . "::" . serialize($options));
if (!isset(self::$cache[$storeId])) {
if (!$this->isPublished()) {
self::$cache[$storeId] = false;
return self::$cache[$storeId];
}
if (isset($this->listing) && $this->listing->cat_id) {
$params = JUDirectoryHelper::getParams($this->listing->cat_id);
} else {
$params = JUDirectoryHelper::getParams(null, $this->listing_id);
}
$show_empty_field = $params->get('show_empty_field', 0);
if ($this->listing_id && !$show_empty_field) {
if (intval($this->value) == 0) {
self::$cache[$storeId] = false;
return self::$cache[$storeId];
}
}
self::$cache[$storeId] = parent::canView($options);
return self::$cache[$storeId];
}
return self::$cache[$storeId];
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:25,代码来源:core_updated.php
示例7: changeTemplateId
public function changeTemplateId()
{
$app = JFactory::getApplication();
$jInput = $app->input;
$templateId = $jInput->post->getInt("value");
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('parent_id');
$query->from('#__judirectory_templates');
$query->where('id = ' . $templateId);
$db->setQuery($query);
$templateParentId = $db->loadResult();
$query = $db->getQuery(true);
$query->select('*');
$query->select('title AS text');
$query->select('id AS value');
$query->from('#__judirectory_template_styles');
$query->where('template_id =' . $templateParentId);
$query->order('lft ASC');
$db->setQuery($query);
$styleObjectList = $db->loadObjectList();
$html = "";
$html .= "<option value=\"\">" . JText::_('COM_JUDIRECTORY_SELECT_PARENT_TEMPLATE') . "</option>";
if (!empty($styleObjectList)) {
foreach ($styleObjectList as $styleObject) {
$html .= "<option value=\"" . $styleObject->value . "\">" . $styleObject->text . "</option>";
}
}
JUDirectoryHelper::obCleanData();
echo $html;
exit;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:32,代码来源:style.php
示例8: getCatPluginParamRecursive
public static function getCatPluginParamRecursive($pluginName, $catId, $param, $default = '', $inheritParam = '', $globalParam = '', $inherit = '-1', $global = '-2')
{
$inheritParam = $inheritParam ? $inheritParam : $param;
$globalParam = $globalParam ? $globalParam : $param;
$path = JUDirectoryHelper::getCategoryPath($catId);
$rootCat = $path[0];
$plugin = JPluginHelper::getPlugin('judirectory', $pluginName);
$pluginParamsStr = isset($plugin->params) ? $plugin->params : '{}';
$pluginParams = new JRegistry($pluginParamsStr);
$pathCatToRoot = array_reverse($path);
foreach ($pathCatToRoot as $category) {
$plugin_params = $category->plugin_params;
if ($plugin_params) {
$plugins = new JRegistry($plugin_params);
$pluginObject = $plugins->get($pluginName, "");
$pluginRegistry = new JRegistry($pluginObject);
if ($pluginRegistry->get($inheritParam, '') !== $inherit) {
if ($pluginRegistry->get($globalParam, '') === $global) {
return $pluginParams->get($param, $default);
} else {
return $pluginRegistry->get($param, $default);
}
} else {
if ($category->parent_id == $rootCat->id) {
return $pluginParams->get($param, $default);
} else {
continue;
}
}
} else {
return $default;
}
}
return $default;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:35,代码来源:pluginparams.php
示例9: getCaptcha
public static function getCaptcha($hiddenCaptcha = false, $captchaNameSpaceValue = null, $label = true, $name = "security_code", $id = "security_code", $captchaNameSpaceName = "captcha_namespace")
{
$document = JFactory::getDocument();
$document->addScript(JUri::root(true) . "/components/com_judirectory/assets/js/captcha.js");
$params = JUDirectoryHelper::getParams();
$captchaNameSpaceValue = !$captchaNameSpaceValue ? md5(time()) : $captchaNameSpaceValue;
$html = '';
if ($label) {
$html .= '<div class="control-group">';
$html .= '<label class="control-label" for="' . $id . '">' . JText::_('COM_JUDIRECTORY_CAPTCHA') . '<span class="required" style="color: red">*</span></label>';
$html .= '<div class="controls">';
}
$html .= '<div class="judir-captcha pull-left">';
$html .= '<div class="clearfix">';
if ($hiddenCaptcha == false) {
$html .= '<img class="captcha-image" alt="' . JText::_('COM_JUDIRECTORY_CAPTCHA') . '"
src="' . JUri::root(true) . '/index.php?option=com_judirectory&task=captcha&captcha_namespace=' . $captchaNameSpaceValue . '&tmpl=component"
width="' . $params->get('captcha_width', '155') . 'px" height="' . $params->get('captcha_height', '50') . 'px"/>';
} else {
$html .= '<img class="captcha-image" alt="' . JText::_('COM_JUDIRECTORY_CAPTCHA') . '"
src="" width="' . $params->get('captcha_width', '155') . 'px" height="' . $params->get('captcha_height', '50') . 'px"/>';
}
$html .= '<input type="hidden" class="captcha-namespace" name="' . $captchaNameSpaceName . '" value="' . $captchaNameSpaceValue . '" />';
$html .= '</div>';
$html .= '<div class="input-group input-group-sm">';
$html .= '<input type="text" id="' . $id . '" name="' . $name . '" class="security_code form-control required" autocomplete="off"/>';
$html .= '<span class="input-group-addon btn btn-default reload-captcha" title="' . JText::_('COM_JUDIRECTORY_RELOAD_CAPTCHA') . '"><i class="fa fa-refresh" ></i></span>';
$html .= '</div>';
$html .= '</div>';
if ($label) {
$html .= '</div>';
$html .= '</div>';
}
return $html;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:35,代码来源:captcha.php
示例10: getInput
protected function getInput()
{
$language = JFactory::getLanguage();
$language->load('com_judirectory', JPATH_ADMINISTRATOR);
$isJoomla3x = JUDirectoryHelper::isJoomla3x();
$fieldsGroup = JUDirectoryHelper::getAdvSearchFields();
$html = '<div id="judirectory-field" style="clear: both;">';
if ($isJoomla3x) {
$html .= JHtml::_('bootstrap.startTabSet', 'search-form', array('active' => 'fieldgroup-1'));
} else {
$html .= JHtml::_('tabs.start', 'search-form');
}
foreach ($fieldsGroup as $groupField) {
if ($isJoomla3x) {
$html .= JHtml::_('bootstrap.addTab', 'search-form', 'fieldgroup-' . $groupField->id, $groupField->name, true);
} else {
$html .= JHtml::_('tabs.panel', $groupField->name, 'fieldgroup-' . $groupField->id);
}
if (!$isJoomla3x) {
$html .= '<fieldset class="adminform">';
$html .= '<ul class="adminformlist">';
}
foreach ($groupField->fields as $field) {
$value = isset($this->value[$field->id]) ? $this->value[$field->id] : "";
$fieldClass = JUDirectoryFrontHelperField::getField($field);
if (JFactory::getApplication()->input->getCmd('view', '') == 'module') {
$fieldClass->name = 'jform[params][fields][' . $fieldClass->id . ']';
}
if ($isJoomla3x) {
$html .= '<div class="control-group">';
$html .= '<div class="control-label">';
$html .= $fieldClass->getLabel(false);
$html .= '</div>';
$html .= '<div class="controls">';
$html .= $fieldClass->getDisplayPrefixText() . $fieldClass->getSearchInput($value) . $fieldClass->getDisplaySuffixText();
$html .= "</div>";
$html .= "</div>";
} else {
$html .= "<li>";
$html .= $fieldClass->getLabel(false);
$html .= $fieldClass->getDisplayPrefixText() . $fieldClass->getSearchInput($value) . $fieldClass->getDisplaySuffixText();
$html .= "</li>";
}
}
if (!$isJoomla3x) {
$html .= '</ul>';
$html .= '</fieldset>';
}
if ($isJoomla3x) {
$html .= JHtml::_('bootstrap.endTab');
}
}
if ($isJoomla3x) {
$html .= JHtml::_('bootstrap.endTabSet');
} else {
$html .= JHtml::_('tabs.end');
}
$html .= '</div>';
return $html;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:60,代码来源:customsearch.php
示例11: populateState
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication();
$pk = $app->input->getInt('id', 0);
$this->setState('tag.id', $pk);
$params = JUDirectoryHelper::getParams();
$this->setState('params', $params);
if ($this->context) {
$listingPagination = $params->get('listing_pagination', 10);
$limitArray = JUDirectoryFrontHelper::customLimitBox();
if (is_array($limitArray) && count($limitArray)) {
$limit = $app->input->getUint('limit', null);
if (is_null($limit) || in_array($limit, $limitArray)) {
$limit = $app->getUserStateFromRequest($this->context . '.list.limit', 'limit', $listingPagination, 'uint');
} else {
$limit = $listingPagination;
}
} else {
$limit = $app->getUserStateFromRequest($this->context . '.list.limit', 'limit', $listingPagination, 'uint');
}
$this->setState('list.limit', $limit);
$this->setState('list.start', $app->input->getUint('limitstart', 0));
$orderCol = $app->getUserStateFromRequest($this->context . '.list.ordering', 'filter_order', '');
$this->setState('list.ordering', $orderCol);
$listOrder = $app->getUserStateFromRequest($this->context . '.list.direction', 'filter_order_Dir', 'ASC');
$this->setState('list.direction', $listOrder);
} else {
$this->setState('list.start', 0);
$this->state->set('list.limit', 0);
}
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:31,代码来源:tag.php
示例12: __set
public function __set($name, $value)
{
switch ($name) {
case 'height':
case 'width':
case 'assetField':
case 'authorField':
case 'asset':
$this->{$name} = (string) $value;
break;
case 'buttons':
$value = (string) $value;
if ($value == 'true' || $value == 'yes' || $value == '1') {
$this->buttons = true;
} elseif ($value == 'false' || $value == 'no' || $value == '0') {
$this->buttons = false;
} else {
$this->buttons = explode(',', $value);
}
break;
case 'hide':
$value = (string) $value;
$this->hide = $value ? explode(',', $value) : array();
break;
case 'editorType':
$this->editorType = explode('|', trim((string) $value));
break;
default:
if (JUDirectoryHelper::isJoomla3x()) {
parent::__set($name, $value);
} else {
$this->{$name} = $value;
}
}
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:35,代码来源:editorsourcecode.php
示例13: addToolBar
protected function addToolBar()
{
$app = JFactory::getApplication();
$app->input->set('hidemainmenu', true);
$isNew = $this->item->id == 0;
$canDo = JUDirectoryHelper::getActions('com_judirectory');
$user = JFactory::getUser();
$userId = $user->id;
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
JToolBarHelper::title(JText::_('COM_JUDIRECTORY_PAGE_' . ($checkedOut ? 'VIEW_TEMPLATE_STYLE' : ($isNew ? 'ADD_TEMPLATE_STYLE' : 'EDIT_TEMPLATE_STYLE'))), 'style-add');
if ($isNew) {
if ($canDo->get('core.create')) {
JToolBarHelper::apply('style.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('style.save2new', 'JTOOLBAR_SAVE_AND_NEW');
JToolBarHelper::save('style.save', 'JTOOLBAR_SAVE');
}
JToolBarHelper::cancel('style.cancel', 'JTOOLBAR_CANCEL');
} else {
if ($canDo->get('core.edit')) {
JToolBarHelper::apply('style.apply', 'JTOOLBAR_APPLY');
if ($canDo->get('core.create')) {
JToolBarHelper::save('style.save2new', 'JTOOLBAR_SAVE_AND_NEW');
}
JToolBarHelper::save('style.save', 'JTOOLBAR_SAVE');
}
JToolBarHelper::cancel('style.cancel', 'JTOOLBAR_CLOSE');
}
JToolBarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
$bar->addButtonPath(JPATH_ADMINISTRATOR . "/components/com_judirectory/helpers/button");
$bar->appendButton('JUHelp', 'help', JText::_('JTOOLBAR_HELP'));
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:32,代码来源:view.html.php
示例14: display
public function display($tpl = null)
{
$this->user = JFactory::getUser();
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->authors = $this->get('Authors');
$this->params = JUDirectoryHelper::getParams();
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode('<br />', $errors));
return false;
}
$levelOptions = array();
$levelOptions[] = JHtml::_('select.option', 5, 5);
$levelOptions[] = JHtml::_('select.option', 10, 10);
$levelOptions[] = JHtml::_('select.option', 15, 15);
$levelOptions[] = JHtml::_('select.option', 20, 20);
$levelOptions[] = JHtml::_('select.option', 25, 25);
$levelOptions[] = JHtml::_('select.option', 30, 30);
$this->levelOptions = $levelOptions;
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$app = JFactory::getApplication();
$this->function = $app->input->get('function', 'jSelectListing');
$this->totalListings = $this->get('Total');
$this->_prepareDocument();
parent::display($tpl);
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:28,代码来源:view.html.php
示例15: getInput
protected function getInput()
{
$html = '';
$db = JFactory::getDbo();
$options = JUDirectoryHelper::getFieldGroupOptions();
if ($this->element['usenone'] == 'true') {
array_unshift($options, array('value' => '0', 'text' => JText::_('COM_JUDIRECTORY_NONE')));
}
if ($this->element['useinherit'] == 'true') {
$appendInherit = "";
if ($this->form->getValue("id")) {
$appendInherit = " ( " . JText::_('COM_JUDIRECTORY_NONE') . " )";
if ($this->form->getValue("id") > 0) {
$catObj = JUDirectoryHelper::getCategoryById($this->form->getValue("parent_id"));
if ($catObj->fieldgroup_id > 1) {
$query = "SELECT name, published FROM #__judirectory_fields_groups WHERE id = " . (int) $catObj->fieldgroup_id . " AND id != 1";
$db->setQuery($query);
$fieldgroup = $db->loadObject();
$groupName = $fieldgroup->published != 1 ? "[" . $fieldgroup->name . "]" : $fieldgroup->name;
$appendInherit = "( " . $groupName . " )";
}
}
}
array_unshift($options, array('value' => '-1', 'text' => JText::_('COM_JUDIRECTORY_INHERIT') . $appendInherit));
} else {
array_unshift($options, array('value' => '', 'text' => JText::_('COM_JUDIRECTORY_SELECT_FIELD_GROUP')));
}
$required_class = $this->element['required'] == 'true' ? 'required' : '';
$attributes = "class=\"inputbox {$required_class}\"";
$html .= JHtml::_('select.genericlist', $options, $this->name, $attributes, 'value', 'text', $this->value, $this->id);
return $html;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:32,代码来源:fieldgroupforcat.php
示例16: getOptions
protected function getOptions()
{
$document = JFactory::getDocument();
if (JUDirectoryHelper::isJoomla3x()) {
$triggerJqueryChosen = '$("#jform_parent_id").trigger("liszt:updated");';
} else {
$triggerJqueryChosen = '';
}
$script = '
jQuery(document).ready(function($){
$("#jform_template_id").change(function(){
var objData = {};
objData.value = $(this).val();
$.ajax({
type: "POST",
url : "index.php?option=com_judirectory&task=style.changeTemplateId",
data: objData
}).done(function (data) {
$("option","#jform_parent_id").remove();
$("#jform_parent_id").append(data);
' . $triggerJqueryChosen . '
});
});
});
';
$document->addScriptDeclaration($script);
$db = JFactory::getDbo();
$options = array();
$styleId = $this->form->getValue('id');
if ($styleId) {
$templateId = $this->form->getValue('template_id');
$query = $db->getQuery(true);
$query->select('parent_id');
$query->from('#__judirectory_templates');
$query->where('id = ' . (int) $templateId);
$db->setQuery($query);
$templateParentId = $db->loadResult();
} else {
$templateParentId = 0;
}
$query = $db->getQuery(true);
$query->select('*');
$query->select('title AS text');
$query->select('id AS value');
$query->from('#__judirectory_template_styles');
$query->where('template_id = ' . (int) $templateParentId);
$query->order('lft ASC');
$db->setQuery($query);
try {
$options = $db->loadObjectList();
} catch (RuntimeException $e) {
JError::raiseWarning(500, $e->getMessage());
}
for ($i = 0, $n = count($options); $i < $n; $i++) {
$options[$i]->text = str_repeat('- ', $options[$i]->level) . $options[$i]->text;
}
$options = array_merge(parent::getOptions(), $options);
return $options;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:59,代码来源:style.php
示例17: listingChangeCategory
public function listingChangeCategory()
{
$model = $this->getModel();
$data = $model->listingChangeCategory();
JUDirectoryHelper::obCleanData();
echo $data;
exit;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:8,代码来源:categories.php
示例18: getCriteriaGroupIdByCategoryId
public static function getCriteriaGroupIdByCategoryId($mainCatId)
{
$catObj = JUDirectoryHelper::getCategoryById($mainCatId);
if ($catObj) {
return $catObj->criteriagroup_id;
}
return null;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:8,代码来源:criteria.php
示例19: listingChangeCategory
public function listingChangeCategory()
{
require_once JPATH_ADMINISTRATOR . '/components/com_judirectory/models/category.php';
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_judirectory/models');
$backendCategoryModel = JModelLegacy::getInstance('Category', 'JUDirectoryModel');
$data = $backendCategoryModel->listingChangeCategory();
JUDirectoryHelper::obCleanData();
echo $data;
exit;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:10,代码来源:categories.php
示例20: loadFormData
protected function loadFormData()
{
$data = JFactory::getApplication()->getUserState('com_judirectory.edit.tag.data', array());
if (empty($data)) {
$data = $this->getItem();
}
if (JUDirectoryHelper::isJoomla3x()) {
$this->preprocessData('com_judirectory.tag', $data);
}
return $data;
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:11,代码来源:tag.php
注:本文中的JUDirectoryHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论