コード例 #1
1
ファイル: AOD_Index.php プロジェクト: omusico/SelkirkCRM
 public function getIndex()
 {
     $indexes = $this->get_full_list();
     if (count($indexes)) {
         $index = $indexes[0];
         return $index;
     } else {
         $index = new AOD_Index();
         $index->name = "Index";
         $index->location = "modules/AOD_Index/Index/Index";
         $index->save();
         return $index;
     }
 }
コード例 #2
0
ファイル: AOD_Index.php プロジェクト: pikkoui/suitecrm
 public function getIndex()
 {
     $index = BeanFactory::getBean('AOD_Index', 1);
     if (!empty($index) && !empty($index->id)) {
         return $index;
     } else {
         $index = new AOD_Index();
         $index->id = 1;
         $index->new_with_id = true;
         $index->name = "Index";
         $index->location = "modules/AOD_Index/Index/Index";
         $index->save();
         return $index;
     }
 }