/**
  * @param \CoandaCMS\Coanda\Coanda $coanda
  */
 public function boot(\CoandaCMS\Coanda\Coanda $coanda)
 {
     // Add the permissions
     $permissions = ['view' => ['name' => 'View', 'options' => []], 'add' => ['name' => 'Add', 'options' => []], 'remove' => ['name' => 'Remove', 'options' => []]];
     $coanda->addModulePermissions('urls', 'Urls', $permissions);
     // Add the router to handle promo urls
     $coanda->addRouter('redirecturl', function ($url) use($coanda) {
         $urlRepository = App::make('CoandaCMS\\Coanda\\Urls\\Repositories\\UrlRepositoryInterface');
         $redirect_url = $urlRepository->getRedirectUrl($url->type_id);
         if ($redirect_url) {
             $redirect_url->addHit();
             $status = $redirect_url->redirect_type == 'perm' ? 301 : 302;
             return \Redirect::to(url($redirect_url->destination), $status);
         }
         App::abort('404');
     });
 }
 /**
  * @param \CoandaCMS\Coanda\Coanda $coanda
  * @return mixed|void
  */
 public function boot(\CoandaCMS\Coanda\Coanda $coanda)
 {
     // Add the permissions
     $permissions = ['view' => ['name' => 'View', 'options' => []], 'edit' => ['name' => 'Edit', 'options' => []], 'download' => ['name' => 'Download', 'options' => []], 'queue' => ['name' => 'Queue', 'options' => []]];
     $coanda->addModulePermissions('webforms', 'Web forms', $permissions);
     $field_types = Config::get('coanda-web-forms::field_types');
     foreach ($field_types as $field_type) {
         if (class_exists($field_type)) {
             $type = new $field_type();
             $this->field_types[$type->identifier()] = $type;
         }
     }
     $post_submit_handlers = Config::get('coanda-web-forms::post_submit_handlers');
     foreach ($post_submit_handlers as $post_submit_handler) {
         if (class_exists($post_submit_handler)) {
             $handler = new $post_submit_handler();
             $this->post_submit_handlers[$handler->identifier()] = $handler;
         }
     }
 }
 /**
  * @param \CoandaCMS\Coanda\Coanda $coanda
  * @return mixed|void
  */
 public function boot(\CoandaCMS\Coanda\Coanda $coanda)
 {
     // Add the permissions
     $permissions = ['view' => ['name' => 'View', 'options' => []]];
     $coanda->addModulePermissions('history', 'History', $permissions);
 }
 /**
  * @param \CoandaCMS\Coanda\Coanda $coanda
  * @return mixed|void
  */
 public function boot(\CoandaCMS\Coanda\Coanda $coanda)
 {
     // Add the permissions
     $permissions = ['create' => ['name' => 'Create', 'options' => []], 'remove' => ['name' => 'Remove', 'options' => []], 'tag' => ['name' => 'Tag', 'options' => []]];
     $coanda->addModulePermissions('media', 'Media', $permissions);
 }
Example #5
0
 /**
  * Outputs all the routes, including those added by modules
  */
 public function routes()
 {
     Route::group(array('prefix' => $this->config->get('coanda::coanda.admin_path')), function () {
         // All module admin routes should be wrapper in the auth filter
         Route::group(array('before' => 'admin_auth'), function () {
             foreach ($this->modules as $module) {
                 $module->adminRoutes();
             }
         });
         // We will put the main admin controller outside the group so it can handle its own filters
         Route::controller('/', 'CoandaCMS\\Coanda\\Controllers\\AdminController');
     });
     // Let the module output any front end 'user' routes
     foreach ($this->modules as $module) {
         $module->userRoutes();
     }
     App::before(function () {
         Route::match(['GET', 'POST'], 'search', function () {
             // Pass this route to the search provider, it can do whatever it likes!
             return Coanda::search()->handleSearch();
         });
         Route::match(['GET', 'POST'], '{slug}', function ($slug) {
             return Coanda::route($slug);
         })->where('slug', '[\\.\\/_\\-\\_A-Za-z0-9]+');
         Route::match(['GET', 'POST'], '/', function () {
             return Coanda::routeHome();
         });
     });
 }
 /**
  * @param \CoandaCMS\Coanda\Coanda $coanda
  * @return mixed|void
  */
 public function boot(\CoandaCMS\Coanda\Coanda $coanda)
 {
     // Add the permissions
     $permissions = [];
     $coanda->addModulePermissions('contentsignoff', 'Content signoff', $permissions);
 }
 /**
  * @param \CoandaCMS\Coanda\Coanda $coanda
  */
 public function boot(\CoandaCMS\Coanda\Coanda $coanda)
 {
     // Add the permissions
     $permissions = ['create' => ['name' => 'Create', 'options' => []], 'edit' => ['name' => 'Edit', 'options' => []], 'remove' => ['name' => 'Remove', 'options' => []]];
     $coanda->addModulePermissions('users', 'Users', $permissions);
 }
 public function boot(\CoandaCMS\Coanda\Coanda $coanda)
 {
     // Add the permissions
     $permissions = ['manage' => ['name' => 'Manage', 'options' => []]];
     $coanda->addModulePermissions('menus', 'Menus', $permissions);
 }