示例#1
0
 function __construct()
 {
     //Load Modules
     $layoutOb = new LayoutsController();
     $modules = $layoutOb->get_modules();
     define('MODULES', serialize($modules));
 }
示例#2
0
 /**
  * Detach Elements from layout.
  *
  * @param  \Element ID
  */
 public function detachElement($layoutId, $elementId)
 {
     $layout = Layout::find($layoutId);
     $layout->elements()->detach($elementId);
     $layout->nrOfElements = $layout->elements()->count();
     $layout->save();
     $data['layout'] = Layout::find($layoutId);
     $data['linkedElements'] = LayoutsController::getElements($layoutId);
     $data['unlinkedElements'] = LayoutsController::getUnlinkedElements($layoutId);
     //TODO redirect to correct url
     return \View::make('layouts.show')->with($data);
 }