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


PHP Period::get_iterated方法代码示例

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


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

示例1: ajax_periods_list

 public function ajax_periods_list()
 {
     $fields_config = array(array('name' => 'created', 'caption' => 'lang:common_table_header_created'), array('name' => 'updated', 'caption' => 'lang:common_table_header_updated'), array('name' => 'name', 'caption' => 'lang:admin_periods_table_header_name'), array('name' => 'related_courses', 'caption' => 'lang:admin_periods_table_header_relations_courses'));
     $filter = $this->input->post('filter');
     $this->store_filter($filter);
     $this->inject_stored_filter();
     $periods = new Period();
     $periods->order_by('sorting', 'asc');
     $periods->include_related_count('course');
     $periods->get_iterated();
     $this->parser->parse('backend/periods/ajax_periods_list.tpl', array('periods' => $periods, 'fields_config' => $fields_config));
 }
开发者ID:andrejjursa,项目名称:list-lms,代码行数:12,代码来源:periods.php

示例2: delete

 /**
  * Delete this period or related object.
  * If no parameters are set, this method deletes current period and re-sort all other periods.
  * @param DataMapper|string $object related object to delete from relation.
  * @param string $related_field relation internal name.
  */
 public function delete($object = '', $related_field = '')
 {
     if (empty($object) && !is_array($object) && !empty($this->id)) {
         $lower_periods = new Period();
         $lower_periods->order_by('sorting', 'asc');
         $lower_periods->where('sorting > ', $this->sorting);
         $lower_periods->get_iterated();
         $ids = array();
         foreach ($lower_periods as $lower_period) {
             $ids[] = $lower_period->id;
         }
         if (count($ids) > 0) {
             $this->db->set('sorting', 'sorting-1', FALSE);
             $this->db->where_in('id', $ids);
             $this->db->update('periods');
         }
     }
     parent::delete($object, $related_field);
 }
开发者ID:andrejjursa,项目名称:list-lms,代码行数:25,代码来源:period.php

示例3: inject_courses

 private function inject_courses()
 {
     $periods = new Period();
     $periods->order_by('sorting', 'asc');
     $periods->get_iterated();
     $data = array(NULL => '');
     if ($periods->exists()) {
         foreach ($periods as $period) {
             $period->course->order_by_with_constant('name', 'asc')->get_iterated();
             if ($period->course->exists() > 0) {
                 foreach ($period->course as $course) {
                     $data[$period->name][$course->id] = $course->name;
                 }
             }
         }
     }
     $this->parser->assign('courses', $data);
 }
开发者ID:andrejjursa,项目名称:list-lms,代码行数:18,代码来源:groups.php


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