예제 #1
0
 protected static function looper($id, $flowid)
 {
     $trees = array();
     $child = Step::where('parentid', '=', $id)->where('flowid', '=', $flowid)->get();
     foreach ($child as $cvalue) {
         if (!empty($cvalue)) {
             $trees[$cvalue->stepid]['desc'] = $cvalue->step;
             $trees[$cvalue->stepid]['child'] = self::looper($cvalue->stepid, $flowid);
         }
     }
     return $trees;
 }
예제 #2
0
 public static function listSteppages($current = NULL)
 {
     $pagelist = Page::all();
     $arrayPages['data'] = array('Sila Pilih');
     foreach ($pagelist as $value) {
         $regnav = Step::where('page', '=', $value->modulpageid)->first();
         if (isset($value->action) && $value->actionalias != '' && $value->visible == 1 && (empty($regnav) or !empty($regnav) && $current != NULL ? $regnav->stepid == $current : empty($regnav))) {
             $arrayPages['data'][$value->modulpageid] = $value->actionalias;
             if (!empty($regnav) && $regnav->stepid == $current) {
                 $arrayPages['selected'] = $regnav->page;
             }
         }
     }
     return $arrayPages;
 }
예제 #3
0
 public function post_deletestep()
 {
     $input = Input::get();
     Log::write('User', 'Delete Step ID ' . Step::find($input['id'])->step . ' by ' . Auth::user()->username);
     Step::find($input['id'])->delete();
     Step::where('parentid', '=', $input['id'])->delete();
     return Menu::flowtree($input['flowid']);
 }