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


PHP JModelAdmin::getItem方法代码示例

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


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

示例1: getItem

 /**
  * Method to get a single comment.
  *
  * @param   integer  $pk  The id of the primary key.
  *
  * @return  mixed  Object on success, false on failure.
  */
 public function getItem($pk = null)
 {
     if ($item = parent::getItem($pk)) {
         $item->content_id = (string) $item->content_id . ' - ' . $this->_getContentTitle($item->id);
     }
     return $item;
 }
开发者ID:ManualesJoomla,项目名称:mjcommentsystem,代码行数:14,代码来源:commentform.php

示例2: getItem

 /**
  * Method to get a single record.
  *
  * @param   integer  $pk  The id of the primary key.
  *
  * @return  mixed  Object on success, false on failure.
  *
  * @since   1.0.0
  */
 public function getItem($pk = null)
 {
     if ($item = parent::getItem($pk)) {
         $item->products = $this->getPromoProducts($item->id);
     }
     return $item;
 }
开发者ID:Shtier,项目名称:digicom,代码行数:16,代码来源:discount.php

示例3: getItem

 /**
  * Method to get a single record.
  *
  * @param	integer	The id of the primary key.
  *
  * @return	mixed	Object on success, false on failure.
  * @since	1.6
  */
 public function getItem($pk = null)
 {
     if ($item = parent::getItem($pk)) {
         //Do any procesing on fields here if needed
     }
     return $item;
 }
开发者ID:emeraldstudio,项目名称:somosmaestros,代码行数:15,代码来源:sliderpublico.php

示例4: getItem

 /**
  * Method to get a single record.
  *
  * @param   integer  $pk  The id of the primary key.
  *
  * @return  mixed  Object on success, false on failure.
  *
  * @since   1.6
  */
 public function getItem($pk = null)
 {
     if ($item = parent::getItem($pk)) {
         if (!empty($item->params)) {
             // Convert the params field to an array.
             $registry = new Registry();
             $registry->loadString($item->params);
             $item->params = $registry->toArray();
         }
         if (!empty($item->metadata)) {
             // Convert the metadata field to an array.
             $registry = new Registry();
             $registry->loadString($item->metadata);
             $item->metadata = $registry->toArray();
         }
         if (!empty($item->interventions)) {
             // JSON Decode interventions.
             $item->interventions = json_decode($item->interventions);
         }
         if (!empty($item->id)) {
             $item->tags = new JHelperTags();
             $item->tags->getTagIds($item->id, 'com_costbenefitprojection.intervention');
         }
     }
     return $item;
 }
开发者ID:namibia,项目名称:CBP-Joomla-3-Component,代码行数:35,代码来源:intervention.php

示例5: getItem

 public function getItem($pk = null)
 {
     if ($item = parent::getItem($pk)) {
         $item->assistance = $item->params['assistance'];
     }
     return $item;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:7,代码来源:transport.php

示例6: getItem

 /**
  * Method to get a single record.
  *
  * @param	integer	The id of the primary key.
  *
  * @return	mixed	Object on success, false on failure.
  */
 public function getItem($pk = null)
 {
     //debug::msg('model->getItem');
     if ($item = parent::getItem($pk)) {
         // Convert the params field to an array.
         /* 	$registry = new JRegistry;
                       $registry->loadString($item->attribs);
                       $item->attribs = $registry->toArray();
         
                       // Convert the metadata field to an array.
                       $registry = new JRegistry;
                       $registry->loadString($item->metadata);
                       $item->metadata = $registry->toArray();
         
                       // Convert the images field to an array.
                       $registry = new JRegistry;
                       $registry->loadString($item->images);
                       $item->images = $registry->toArray();
         
                       // Convert the urls field to an array.
                       $registry = new JRegistry;
                       $registry->loadString($item->urls);
                       $item->urls = $registry->toArray();
         
         
         
                       $item->articletext = trim($item->fulltext) != '' ? $item->introtext . "<hr id=\"system-readmore\" />" . $item->fulltext : $item->introtext;
                      * 
                      */
     }
     return $item;
 }
开发者ID:GGallery,项目名称:MDWEBTV-new,代码行数:39,代码来源:unita.php

示例7: getItem

 /**
  * Method to get a single record.
  *
  * @param     integer    The id of the primary key.
  *
  * @return    mixed      Object on success, false on failure.
  */
 public function getItem($pk = null)
 {
     $item = parent::getItem($pk);
     if ($item == false) {
         return false;
     }
     if (property_exists($item, 'attribs')) {
         // Convert the params field to an array.
         $registry = new JRegistry();
         $registry->loadString($item->attribs);
         $item->params = $registry;
         $item->attribs = $registry->toArray();
     }
     if ($item->id > 0) {
         // Existing record
         $labels = $this->getInstance('Labels', 'PFModel');
         $item->labels = $labels->getConnections('com_pfrepo.directory', $item->id);
         $item->orphaned = $this->isOrphaned($item->project_id);
         $item->element_count = 0;
     } else {
         // New record
         $item->labels = array();
         $item->orphaned = false;
         $item->element_count = $this->getElementCount($pk);
     }
     return $item;
 }
开发者ID:eno93,项目名称:Projectfork,代码行数:34,代码来源:directory.php

示例8: getItem

 public function getItem($pk = null)
 {
     if ($item = parent::getItem($pk)) {
         $registry = new JRegistry();
         $registry->loadString($item->metadata);
         $item->metadata = $registry->toArray();
     }
     // Load associated contact items
     $app = JFactory::getApplication();
     $assoc = JLanguageAssociations::isEnabled();
     if ($assoc) {
         $item->associations = array();
         if ($item->id != null) {
             $associations = JLanguageAssociations::getAssociations('com_authorlist', '#__authorlist', 'com_authorlist.author', $item->id, 'id', '', '');
             foreach ($associations as $tag => $association) {
                 $item->associations[$tag] = $association->id;
             }
         }
     }
     // Load item tags
     if (!empty($item->id)) {
         $item->tags = new JHelperTags();
         $item->tags->getTagIds($item->id, 'com_authorlist.author');
     }
     return $item;
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:26,代码来源:author.php

示例9: getItem

 /**
  * Method to get a single record.
  *
  * @param     integer    The id of the primary key.
  *
  * @return    mixed      Object on success, false on failure.
  */
 public function getItem($pk = null)
 {
     if ($item = parent::getItem($pk)) {
         // TODO?
     }
     return $item;
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:14,代码来源:label.php

示例10: getItem

 /**
  * Method to get a single record.
  *
  * @param   integer  $pk  The id of the primary key.
  *
  * @return  mixed	Object on success, false on failure.
  *
  * @since   1.6
  */
 public function getItem($pk = null)
 {
     $result = parent::getItem($pk);
     // Trigger the data preparation event.
     $results = Event::trigger('user.onContentPrepareData', array('com_users.user', $result));
     return $result;
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:16,代码来源:user.php

示例11: getItem

 public function getItem($pk = null)
 {
     $item = parent::getItem($pk);
     $item->selections = new Registry($item->selections);
     $item->selections = $item->selections->toArray();
     return $item;
 }
开发者ID:b2un0,项目名称:joomla-component-mapx,代码行数:7,代码来源:sitemap.php

示例12: getItem

 /**
  * Method to get a category.
  *
  * @param	integer	An optional id of the object to get, otherwise the id from the model state is used.
  * @return	mixed	Category data object on success, false on failure.
  * @since	1.6
  */
 public function getItem($pk = null)
 {
     if ($result = parent::getItem($pk)) {
         // Prime required properties.
         if (empty($result->id)) {
             $result->parent_id = $this->getState('category.parent_id');
             $result->extension = $this->getState('category.extension');
         }
         // Convert the metadata field to an array.
         $registry = new JRegistry();
         $registry->loadJSON($result->metadata);
         $result->metadata = $registry->toArray();
         // Convert the created and modified dates to local user time for display in the form.
         jimport('joomla.utilities.date');
         $tz = new DateTimeZone(JFactory::getApplication()->getCfg('offset'));
         if (intval($result->created_time)) {
             $date = new JDate($result->created_time);
             $date->setTimezone($tz);
             $result->created_time = $date->toMySQL(true);
         } else {
             $result->created_time = null;
         }
         if (intval($result->modified_time)) {
             $date = new JDate($result->modified_time);
             $date->setTimezone($tz);
             $result->modified_time = $date->toMySQL(true);
         } else {
             $result->modified_time = null;
         }
     }
     return $result;
 }
开发者ID:TFToto,项目名称:playjoom-builds,代码行数:39,代码来源:catforplayjoom.php

示例13: getItem

 /**
  * Method to get a single record.
  *
  * @param   integer  $pk  The id of the primary key.
  *
  * @return  mixed  Object on success, false on failure.
  *
  * @since   1.6
  */
 public function getItem($pk = null)
 {
     if ($item = parent::getItem($pk)) {
         if (!empty($item->params)) {
             // Convert the params field to an array.
             $registry = new Registry();
             $registry->loadString($item->params);
             $item->params = $registry->toArray();
         }
         if (!empty($item->metadata)) {
             // Convert the metadata field to an array.
             $registry = new Registry();
             $registry->loadString($item->metadata);
             $item->metadata = $registry->toArray();
         }
         if (!empty($item->groups)) {
             // JSON Decode groups.
             $item->groups = json_decode($item->groups, true);
         }
         if (!empty($item->id)) {
             $item->tags = new JHelperTags();
             $item->tags->getTagIds($item->id, 'com_componentbuilder.help_document');
         }
     }
     return $item;
 }
开发者ID:vdm-io,项目名称:Joomla-Component-Builder,代码行数:35,代码来源:help_document.php

示例14: getItem

 public function getItem($pk = null)
 {
     if ($item = parent::getItem($pk)) {
         // Convert the params field to an array.
     }
     return $item;
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:7,代码来源:country.php

示例15: getItem

 /**
  * Method to get a single record.
  *
  * @param   integer  $pk  The id of the primary key.
  *
  * @return  mixed  Object on success, false on failure.
  *
  * @since   1.6
  */
 public function getItem($pk = null)
 {
     if ($item = parent::getItem($pk)) {
         if (!empty($item->params)) {
             // Convert the params field to an array.
             $registry = new Registry();
             $registry->loadString($item->params);
             $item->params = $registry->toArray();
         }
         if (!empty($item->metadata)) {
             // Convert the metadata field to an array.
             $registry = new Registry();
             $registry->loadString($item->metadata);
             $item->metadata = $registry->toArray();
         }
         if (!empty($item->testcompanies)) {
             // JSON Decode testcompanies.
             $item->testcompanies = json_decode($item->testcompanies);
         }
         if (!empty($item->id)) {
             $item->tags = new JHelperTags();
             $item->tags->getTagIds($item->id, 'com_costbenefitprojection.service_provider');
         }
     }
     $this->service_providervvvx = $item->id;
     return $item;
 }
开发者ID:namibia,项目名称:CBP-Joomla-3-Component,代码行数:36,代码来源:service_provider.php


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