Example #1
0
 public function show($section_id)
 {
     //show single
     $this->data['section'] = Section::find($section_id, 'id');
     $ft = new FieldType();
     $this->data['fieldtypes'] = $ft->all();
     View::Render('settings.sections.edit', $this->data, Settings::viewFolder());
 }
Example #2
0
 public function __construct()
 {
     if (GRAFT_CONFIG['DBHost'] == '' || GRAFT_CONFIG['DBName'] == '' || GRAFT_CONFIG['DBUser'] == '') {
         die('A database connection is required to run clout.');
     }
     // instance everything so the db gets setup
     // probably need a better way to do this
     // in the future #TODO
     \GraftPHP\Clout\Data::build();
     \GraftPHP\Clout\Field::build();
     \GraftPHP\Clout\FieldType::build();
     \GraftPHP\Clout\Record::build();
     \GraftPHP\Clout\Section::build();
     \GraftPHP\Clout\User::build();
     $this->data['sections'] = Section::all();
 }
Example #3
0
 public function type()
 {
     return FieldType::where('id', '=', $this->type)->get()->first();
 }