public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app->get('/content/sort/{contentTypeAccessHash}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Sort\\Controller::sortRecords')->bind('sortRecords')->value('workspace', null)->value('language', null); $app->post('/content/sort/{contentTypeAccessHash}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Sort\\Controller::postSortRecords')->bind('postSortRecords')->value('workspace', null)->value('language', null); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app->get('/', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Start\\Controller::index')->bind('index'); $app->get('/index/{repositoryAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Start\\Controller::indexRepository')->bind('indexRepository'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app->get('login', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\User\\Controller::login')->bind('login'); $app->post('login', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\User\\Controller::post')->bind('postLogin'); $app->get('logout', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\User\\Controller::logout')->bind('logout'); $app['user'] = $app->share(function ($app) { return new UserManager($app, $app['context'], $app['config'], $app['session']); }); // Perform a hard redirect, if no user is logged in $app->before(function (Request $request) use($app) { $parts = explode('/', trim($request->getPathInfo(), '/')); if (isset($parts[0]) && !in_array($parts[0], array('login', 'css', 'js', 'public'))) { if (!$app['user']->isLoggedIn()) { Header('Location: ' . $app['url_generator']->generate('login'), 303); die; } } }); if ($this->app['env'] == 'console') { $app->registerAuthenticationAdapter('config', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\User\\ConsoleAuthenticationAdapter'); } else { $app->registerAuthenticationAdapter('config', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\User\\ConfigAuthenticationAdapter'); } }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->register(new \Silex\Provider\UrlGeneratorServiceProvider()); $app->register(new \Silex\Provider\SessionServiceProvider()); $app['cache'] = new ArrayCache(); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app['menus'] = $app->share(function ($app) { return new MenuManager($app); }); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->post('/timeshift/content/list/{contentTypeAccessHash}/page/{page}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\TimeShift\\Controller::timeShiftListRecords')->bind('timeShiftListRecords'); $app->post('/timeshift/content/edit/{contentTypeAccessHash}/{recordId}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\TimeShift\\Controller::timeShiftEditRecord')->bind('timeShiftEditRecord'); $app->post('/timeshift/content/sort/{contentTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\TimeShift\\Controller::timeShiftSortRecords')->bind('timeShiftSortRecords'); $app->post('/timeshift/config/edit/{configTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\TimeShift\\Controller::timeShiftEditConfig')->bind('timeShiftEditConfig'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app['pager'] = $app->share(function ($app) { return new PagingHelper($app['twig'], $app['layout'], $app['url_generator']); }); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app['layout'] = $app->share(function ($app) { return new LayoutManager($app, $app['twig'], $app['context']); }); }
/** * Available options: * * key provide your google maps api key here * * @param Application $app * @param array $options */ public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app->get('/edit/modal/geolocation/{tempId}//', 'AnyContent\\CMCK\\Modules\\Backend\\Edit\\GeoLocationFormElement\\Controller::modal')->value('module', $this); $app->get('/edit/modal/geolocation/{tempId}/{lat}/', 'AnyContent\\CMCK\\Modules\\Backend\\Edit\\GeoLocationFormElement\\Controller::modal')->value('module', $this); $app->get('/edit/modal/geolocation/{tempId}/{lat}/{long}', 'AnyContent\\CMCK\\Modules\\Backend\\Edit\\GeoLocationFormElement\\Controller::modal')->value('module', $this); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app['repos'] = $app->share(function ($app) { return new RepositoryManager($app); }); $app['console']->add(new ListRepositoriesCommand()); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app->get('/config/edit/{configTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Config\\Controller::editConfig')->bind('editConfig'); $app->post('/config/edit/{configTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Config\\Controller::saveConfig'); $app['form'] = $app->share(function ($app) { return new FormManager($app); }); }
public function init(Application $app, $options = array()) { parent::init($app, $options); if ($app['env'] == 'console') { $app['session'] = new ParameterBag(); } $app['context'] = $app->share(function ($app) { return new ContextManager($app); }); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app['contentViews'] = $app->share(function ($app) { return new ContentViewsManager($app); }); $app->addTemplatesFolders(__DIR__ . '/views/'); $app->get('/content/list/{contentTypeAccessHash}/{nr}/page/{page}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Listing\\Controller::listRecords')->bind('listRecords')->value('page', 1)->value('workspace', null)->value('language', null)->value('nr', 0); $app->get('/content/list/{contentTypeAccessHash}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Listing\\Controller::listRecords')->bind('listRecordsReset')->value('workspace', null)->value('language', null)->value('nr', 1); $app['contentViews']->registerContentView('default', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Listing\\ContentViewDefault'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app->get('/content/export/{contentTypeAccessHash}/modal', 'AnyContent\\CMCK\\Modules\\Backend\\Edit\\Exchange\\Controller::exportRecords')->bind('exportRecords')->value('module', $this); $app->get('/content/import/{contentTypeAccessHash}/modal', 'AnyContent\\CMCK\\Modules\\Backend\\Edit\\Exchange\\Controller::importRecords')->bind('importRecords')->value('module', $this); $app->post('/content/export/{contentTypeAccessHash}/execute/{token}', 'AnyContent\\CMCK\\Modules\\Backend\\Edit\\Exchange\\Controller::executeExportRecords')->bind('executeExportRecords')->value('module', $this); $app->post('/content/import/{contentTypeAccessHash}/execute', 'AnyContent\\CMCK\\Modules\\Backend\\Edit\\Exchange\\Controller::executeImportRecords')->bind('executeImportRecords')->value('module', $this); $app['console']->add(new ExportCommand()); $app['console']->add(new ImportCommand()); $app['console']->add(new ArchiveCommand()); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app->get('/files/{repositoryAccessHash}/{path}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Files\\Controller::listFiles')->assert('path', '.*')->bind('listFiles'); $app->get('/file/{repositoryAccessHash}/view/{id}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Files\\Controller::viewFile')->assert('id', '.*')->bind('viewFile'); $app->get('/file/{repositoryAccessHash}/download/{id}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Files\\Controller::downloadFile')->assert('id', '.*')->bind('downloadFile'); $app->get('/file/{repositoryAccessHash}/delete/{id}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Files\\Controller::deleteFile')->assert('id', '.*')->bind('deleteFile'); $app->post('/files/{repositoryAccessHash}/{path}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Files\\Controller::post')->assert('path', '.*')->value('mode', 'page'); // routes for file selection (as used in file form elements) $app->get('/file-select/{repositoryAccessHash}/{path}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Files\\Controller::listFiles')->assert('path', '.*')->value('mode', 'modal')->bind('listFilesSelect'); $app->post('/file-select/{repositoryAccessHash}/{path}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Files\\Controller::post')->assert('path', '.*')->value('mode', 'modal')->value('mode', 'modal'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->post('/change-workspace/content/list/{contentTypeAccessHash}/page/{page}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\WorkspacesLanguages\\Controller::changeWorkspaceListRecords')->bind('changeWorkspaceListRecords'); $app->post('/change-workspace/content/edit/{contentTypeAccessHash}/{recordId}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\WorkspacesLanguages\\Controller::changeWorkspaceEditRecord')->bind('changeWorkspaceEditRecord'); $app->post('/change-workspace/content/add/{contentTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\WorkspacesLanguages\\Controller::changeWorkspaceAddRecord')->bind('changeWorkspaceAddRecord'); $app->post('/change-workspace/content/sort/{contentTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\WorkspacesLanguages\\Controller::changeWorkspaceSortRecords')->bind('changeWorkspaceSortRecords'); $app->post('/change-workspace/config/edit/{configTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\WorkspacesLanguages\\Controller::changeWorkspaceEditConfig')->bind('changeWorkspaceEditConfig'); $app->post('/change-language/content/list/{contentTypeAccessHash}/page/{page}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\WorkspacesLanguages\\Controller::changeLanguageListRecords')->bind('changeLanguageListRecords'); $app->post('/change-language/content/edit/{contentTypeAccessHash}/{recordId}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\WorkspacesLanguages\\Controller::changeLanguageEditRecord')->bind('changeLanguageEditRecord'); $app->post('/change-language/content/add/{contentTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\WorkspacesLanguages\\Controller::changeLanguageAddRecord')->bind('changeLanguageAddRecord'); $app->post('/change-language/content/sort/{contentTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\WorkspacesLanguages\\Controller::changeLanguageSortRecords')->bind('changeLanguageSortRecords'); $app->post('/change-language/config/edit/{configTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\WorkspacesLanguages\\Controller::changeLanguageEditConfig')->bind('changeLanguageEditConfig'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app->get('admin', 'AnyContent\\CMCK\\Modules\\Backend\\Admin\\CMDL\\Controller::admin')->bind('admin'); $app->get('/admin/edit/content_type/{contentTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Admin\\CMDL\\Controller::adminEditContentType')->bind('adminEditContentType'); $app->post('/admin/edit/content_type/{contentTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Admin\\CMDL\\Controller::postEditContentType')->bind('postEditContentType'); $app->get('/admin/delete/content_type/{contentTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Admin\\CMDL\\Controller::adminDeleteContentType')->bind('adminDeleteContentType'); $app->post('/admin/add/content_type/{repositoryAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Admin\\CMDL\\Controller::adminAddContentType')->bind('adminAddContentType'); $app->get('/admin/edit/config_type/{configTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Admin\\CMDL\\Controller::adminEditConfigType')->bind('adminEditConfigType'); $app->post('/admin/edit/config_type/{configTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Admin\\CMDL\\Controller::postEditConfigType')->bind('postEditConfigType'); $app->get('/admin/delete/config_type/{configTypeAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Admin\\CMDL\\Controller::adminDeleteConfigType')->bind('adminDeleteConfigType'); $app->post('/admin/add/config_type/{repositoryAccessHash}', 'AnyContent\\CMCK\\Modules\\Backend\\Admin\\CMDL\\Controller::adminAddConfigType')->bind('adminAddConfigType'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app->get('/content/edit/{contentTypeAccessHash}/{recordId}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Edit\\Controller::editRecord')->bind('editRecord')->value('workspace', null)->value('language', null); $app->get('/content/add/{contentTypeAccessHash}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Edit\\Controller::addRecord')->bind('addRecord')->value('workspace', null)->value('language', null); $app->get('/content/add/{contentTypeAccessHash}/{recordId}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Edit\\Controller::addRecord')->bind('addRecordVersion')->value('workspace', null)->value('language', null); $app->get('/content/delete/{contentTypeAccessHash}/{recordId}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Edit\\Controller::deleteRecord')->bind('deleteRecord')->value('workspace', null)->value('language', null); $app->get('/content/transfer/{contentTypeAccessHash}/{recordId}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Edit\\Controller::transferRecordModal')->bind('transferRecordModal')->value('workspace', null)->value('language', null); // The url parts "workspace" and "language" within post routes are necessary to mirror the possible get routes, but aren't processed $app->post('/content/transfer/{contentTypeAccessHash}/{recordId}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Edit\\Controller::transferRecord')->bind('transferRecord')->value('workspace', null)->value('language', null); $app->post('/content/edit/{contentTypeAccessHash}/{recordId}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Edit\\Controller::saveRecord')->value('workspace', null)->value('language', null); $app->post('/content/add/{contentTypeAccessHash}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Edit\\Controller::saveRecord')->value('workspace', null)->value('language', null); $app->post('/content/add/{contentTypeAccessHash}/{recordId}/{workspace}/{language}', 'AnyContent\\CMCK\\Modules\\Backend\\Core\\Edit\\Controller::saveRecord')->value('workspace', null)->value('language', null); $app['form'] = $app->share(function ($app) { return new FormManager($app); }); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app['contentViews']->registerContentView('list', 'AnyContent\\CMCK\\Modules\\Backend\\View\\CustomList\\ContentViewCustomList'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/malsup-blockui'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/vlamanna-BootstrapFormHelpers/dist/css'); $app->addTemplatesFolders(__DIR__ . '/vlamanna-BootstrapFormHelpers/dist/js'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app['contentViews']->registerContentView('glossary', 'AnyContent\\CMCK\\Modules\\Backend\\View\\Glossary\\ContentViewGlossary'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/autosize-master'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/jquery-minicolors-master'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/mjsarfatti-nestedSortable'); }
public function init(Application $app, $options = array()) { parent::init($app, $options); $app->addTemplatesFolders(__DIR__ . '/views/'); $app->get('/edit/check/link/{path}', 'AnyContent\\CMCK\\Modules\\Backend\\Edit\\LinkFormElement\\Controller::check')->value('module', $this)->assert('path', '.+')->bind('checkLink'); }