当前位置: 首页>>代码示例>>PHP>>正文


PHP JUDirectoryHelper::getTempListing方法代码示例

本文整理汇总了PHP中JUDirectoryHelper::getTempListing方法的典型用法代码示例。如果您正苦于以下问题:PHP JUDirectoryHelper::getTempListing方法的具体用法?PHP JUDirectoryHelper::getTempListing怎么用?PHP JUDirectoryHelper::getTempListing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JUDirectoryHelper的用法示例。


在下文中一共展示了JUDirectoryHelper::getTempListing方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: storeValue

 public function storeValue($value)
 {
     $app = JFactory::getApplication();
     if ($app->isSite()) {
         return true;
     } else {
         $tmpListing = JUDirectoryHelper::getTempListing($this->listing_id);
         if (is_object($tmpListing)) {
             return true;
         }
         $approveOption = $app->input->post->get("approval_option");
         $approveOptionArray = array("ignore", "approve", "delete");
         if (in_array($approveOption, $approveOptionArray)) {
             return true;
         }
         return parent::storeValue($value);
     }
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:18,代码来源:core_approved.php

示例2: display

 public function display($tpl = null)
 {
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->model = $this->getModel();
     $this->app = JFactory::getApplication();
     $cat_id = $this->item->cat_id ? $this->item->cat_id : $this->app->input->get('cat_id');
     $this->params = JUDirectoryHelper::getParams(null, $this->item->id);
     if ($cat_id == JUDirectoryFrontHelperCategory::getRootCategory()->id && !$this->params->get('allow_add_listing_to_root', 0)) {
         JError::raiseError(500, JText::_('COM_JUDIRECTORY_CAN_NOT_ADD_LISTING_TO_ROOT_CATEGORY'));
         return false;
     }
     if ($tempListing = JUDirectoryHelper::getTempListing($this->item->id)) {
         $editPendingListingLink = '<a href="index.php?option=com_judirectory&task=document.edit&approve=1&id=' . $tempListing->id . '">' . $tempListing->title . '</a>';
         JError::raiseNotice('', JText::sprintf('COM_JUDIRECTORY_THIS_LISTING_HAS_PENDING_LISTING_X_PLEASE_APPROVE_PENDING_LISTING_FIRST', $editPendingListingLink));
     }
     if ($this->item->approved < 0) {
         $oriListingId = abs($this->item->approved);
         $oriListingObj = JUDirectoryHelper::getListingById($oriListingId);
         $editOriDocLink = '<a href="index.php?option=com_judirectory&task=document.edit&id=' . $oriListingId . '">' . $oriListingObj->title . '</a>';
         JError::raiseNotice('', JText::sprintf('COM_JUDIRECTORY_ORIGINAL_LISTING_X', $editOriDocLink));
     }
     $this->script = $this->get('Script');
     $this->plugins = $this->get('Plugins');
     $this->fieldLocations = $this->get('FieldLocations');
     $this->fieldsetDetails = $this->model->getCoreFields('details');
     $this->fieldsetPublishing = $this->model->getCoreFields('publishing');
     $this->fieldsetTemplateStyleAndLayout = $this->model->getCoreFields('template_style');
     $this->fieldsetMetadata = $this->model->getCoreFields('metadata');
     $this->fieldCatid = JUDirectoryFrontHelperField::getField('cat_id', $this->item);
     $this->fieldGallery = $this->get('GalleryField');
     $this->extraFields = $this->get('ExtraFields');
     $this->fieldsData = $this->app->getUserState("com_judirectory.edit.listing.fieldsdata", array());
     $this->relatedListings = $this->get('RelatedListings');
     $this->canDo = JUDirectoryHelper::getActions('com_judirectory', 'category', $this->item->cat_id);
     $this->addToolBar();
     $this->setDocument();
     parent::display($tpl);
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:43,代码来源:view.html.php

示例3: foreach

 $this->addAttribute("class", "radio btn-group", "input");
 $html = "<fieldset id=\"" . $this->getId() . "\" " . $this->getAttribute(null, null, "input") . ">";
 foreach ($options as $key => $option) {
     if ($option->text == strtoupper($option->text)) {
         $text = JText::_($option->text);
     } else {
         $text = $option->text;
     }
     $text = htmlspecialchars($text, ENT_COMPAT, 'UTF-8');
     $this->setAttribute("value", htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8'), "input");
     if ($option->value == $value) {
         $this->setAttribute("checked", "checked", "input");
     } else {
         $this->setAttribute("checked", null, "input");
     }
     $tmpListing = JUDirectoryHelper::getTempListing($this->listing_id);
     if (is_object($tmpListing)) {
         $this->setAttribute("disabled", "disabled", "input");
     } else {
         $this->setAttribute("disabled", null, "input");
         if (is_object($this->listing) && $this->listing->approved < 0) {
             $this->setAttribute("disabled", "disabled", "input");
         }
     }
     $html .= "<input id=\"" . $this->getId() . $key . "\" name=\"" . $this->getName() . "\" " . $this->getAttribute(null, null, "input") . " /> <label for=\"" . $this->getId() . $key . "\">{$text}</label>";
 }
 if (is_object($this->listing) && $this->listing->approved < 0) {
     $html .= "<input type=\"hidden\" name=\"" . $this->getName() . "\" value=\"" . $value . "\" />";
 }
 $html .= "</fieldset>";
 echo $html;
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:31,代码来源:input.php


注:本文中的JUDirectoryHelper::getTempListing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。