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


PHP JTable::getNextOrder方法代码示例

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


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

示例1: store

 /**
  * Override paren't store method so we can do some checking with the watermarks.
  *
  * @return	bool	True on success.
  **/
 public function store($updateNulls = false)
 {
     if (!$this->id) {
         $this->ordering = parent::getNextOrder();
     }
     parent::store();
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:12,代码来源:multiprofile.php

示例2: store

 /**
  * Override paren't store method so we can do some checking with the watermarks.
  * 
  * @return	bool	True on success.	 	 
  **/
 public function store()
 {
     if (!$this->id) {
         $this->ordering = parent::getNextOrder();
     }
     parent::store();
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:12,代码来源:multiprofile.php

示例3: prepareTable

 /**
  * Prepare and sanitise the table data prior to saving.
  *
  * @param   JTable  $table  A JTable object.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function prepareTable($table)
 {
     // Set the publish date to now
     $db = $this->getDbo();
     if ($table->state == 1 && (int) $table->publish_up == 0) {
         $table->publish_up = JFactory::getDate()->toSql();
     }
     if ($table->state == 1 && intval($table->publish_down) == 0) {
         $table->publish_down = $db->getNullDate();
     }
     // Increment the content version number.
     $table->version++;
     // Reorder the articles within the category so the new article is first
     if (empty($table->id)) {
         $table->ordering = $table->getNextOrder('catid = ' . (int) $table->catid . ' AND state >= 0');
     }
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:26,代码来源:article.php

示例4: testGetNextOrder

 /**
  * Test the getNextOrder method.
  *
  * @return  void
  *
  * @since   12.3
  */
 public function testGetNextOrder()
 {
     $this->assertEquals(3, $this->object->getNextOrder());
 }
开发者ID:joomla-projects,项目名称:media-manager-improvement,代码行数:11,代码来源:JTableTest.php

示例5: onBeforeSave

 /**
  * onBeforeSave method. Hook for chidlren model to prepare the data.
  *
  * @param   array  $data     The data to be saved.
  * @param   JTable  $table   The table object.
  *
  * @return boolean
  */
 protected function onBeforeSave(&$data, $table)
 {
     // Get database
     $db = $this->getDBO();
     // User
     $user = JFactory::getUser();
     // Permissions check
     if (!$user->authorise('k2.extrafields.manage')) {
         $this->setError(JText::_('K2_YOU_ARE_NOT_AUTHORIZED_TO_PERFORM_THIS_OPERATION'));
         return false;
     }
     // Ordering
     if (!$table->id) {
         $data['ordering'] = $table->getNextOrder($db->quoteName('group') . ' = ' . (int) $data['group']);
     }
     return true;
 }
开发者ID:Naldo100,项目名称:k2-v3-dev-build,代码行数:25,代码来源:extrafields.php

示例6: getNextOrder

 /**
  * Overwrites JTable's getNextOrder function by expecting an array of columns and values or SocialSql object
  *
  * @since   1.0
  * @access  public
  * @param   string/array/SocialSql  The filter clause to pass to JTable getNextOrder function
  * @return  int
  **/
 public function getNextOrder($where = '')
 {
     $string = '';
     if (is_string($where)) {
         $string = $where;
     }
     if (is_array($where)) {
         $db = FD::db();
         $string = array();
         foreach ($where as $k => $v) {
             $string[] = $db->nameQuote($k) . ' = ' . $db->quote($v);
         }
         $string = implode(' AND ', $string);
     }
     if (is_object($where) && get_class($where) === 'SocialSql') {
         $string = $where->getConditionSql();
     }
     return parent::getNextOrder($string);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:27,代码来源:table.php


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