Exemplo n.º 1
0
 public function boot()
 {
     Modules::registerModule('course', 'Course module');
     AppTexts::registerName(CourseTexts::AREA_COURSE_LIST_TEXT);
     AppTexts::registerName(CourseTexts::GROUP_COURSE_LIST_TEXT);
     Activators::registerActivator('course.completed');
 }
Exemplo n.º 2
0
 public function boot()
 {
     Modules::registerModule('milestone', 'Milestone module');
     AppTexts::registerName(MilestoneTexts::AREA_MILESTONE_EDITOR_TEXT);
     AppTexts::registerName(MilestoneTexts::GROUP_MILESTONE_EDITOR_TEXT);
     AppTexts::registerName(MilestoneTexts::PROJECT_MILESTONE_EDITOR_TEXT);
 }
Exemplo n.º 3
0
 /**
  * @Route("/index", name="project_settings_index")
  */
 public function indexAction(Request $request)
 {
     $settings = $this->get('cantiga.project.settings');
     $form = $this->createForm(ProjectSettingsForm::class, $settings->toArray(), ['action' => $this->generateUrl('project_settings_index', ['slug' => $this->getSlug()]), 'settings' => $settings, 'extensionPoints' => $this->getExtensionPoints(), 'filter' => $this->getExtensionPointFilter()]);
     $form->handleRequest($request);
     if ($form->isValid()) {
         $settings->fromArray($form->getData());
         $settings->saveSettings();
         $this->get('session')->getFlashBag()->add('info', $this->trans('The project settings have been saved.'));
     }
     return $this->render('CantigaCoreBundle:ProjectSettings:index.html.twig', array('project' => $this->getActiveProject(), 'projectSettings' => $settings->getOrganized(), 'modules' => Modules::fetchAll(), 'form' => $form->createView()));
 }
Exemplo n.º 4
0
 public function boot()
 {
     Modules::registerModule('edk', 'EDK module');
     CustomForms::registerService('edk:area-request-form', 'wio.edk.form.area_request');
     CustomForms::registerService('edk:area-form', 'wio.edk.form.area');
     AppTexts::registerName(EdkTexts::REGISTRATION_SETTINGS_TEXT);
     AppTexts::registerName(EdkTexts::MESSAGE_TEXT);
     AppTexts::registerName(EdkTexts::PARTICIPANT_TEXT);
     AppTexts::registerName(EdkTexts::REGISTRATION_FORM_TEXT);
     AppTexts::registerName(EdkTexts::REGISTRATION_TERMS1_TEXT);
     AppTexts::registerName(EdkTexts::REGISTRATION_TERMS2_TEXT);
     AppTexts::registerName(EdkTexts::REGISTRATION_TERMS3_TEXT);
     AppMails::registerName(EdkTexts::NOTIFICATION_MAIL);
     AppMails::registerName(EdkTexts::REGISTRATION_MAIL);
     Activators::registerActivator('route.approved');
 }
Exemplo n.º 5
0
 public function boot()
 {
     Modules::registerModule('forum', 'Forum module');
 }
Exemplo n.º 6
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('name', TextType::class, array('label' => 'Name'))->add('description', TextareaType::class, array('label' => 'Description'))->add('parentProject', ChoiceType::class, array('label' => 'Parent project', 'required' => false, 'choices' => $options['projectRepo']->getFormChoices()))->add('modules', ChoiceType::class, array('label' => 'Modules', 'expanded' => true, 'multiple' => true, 'choices' => Modules::getFormEntries()))->add('areasAllowed', BooleanType::class, array('label' => 'Areas allowed?'))->add('areaRegistrationAllowed', BooleanType::class, array('label' => 'Area registration allowed?'))->add('save', SubmitType::class, array('label' => 'Save'));
 }
Exemplo n.º 7
0
 public function boot()
 {
     Modules::registerModule('links', 'Links module');
 }
Exemplo n.º 8
0
 public function getFunctions()
 {
     return array(new Twig_SimpleFunction('dt_columns', [$this, 'dataTableColumns'], array('is_safe' => array('html'))), new Twig_SimpleFunction('dt_actions', [$this, 'dataTableActions'], array('is_safe' => array('html'))), new Twig_SimpleFunction('dt_col_link', [$this, 'dataTableLink'], array('is_safe' => array('html'))), new Twig_SimpleFunction('dt_col_label', [$this, 'dataTableLabel'], array('is_safe' => array('html'))), new Twig_SimpleFunction('dt_col_rewrite', [$this, 'dataTableRewrite'], array('is_safe' => array('html'))), new Twig_SimpleFunction('dt_col_boolean', [$this, 'dataTableBoolean'], array('is_safe' => array('html'))), new Twig_SimpleFunction('dt_col_progress', [$this, 'dataTableProgress'], array('is_safe' => array('html'))), new Twig_SimpleFunction('avatar', [$this, 'avatar']), new Twig_SimpleFunction('format_time', [$this, 'formatTime']), new Twig_SimpleFunction('format_date', [$this, 'formatDate']), new Twig_SimpleFunction('ago', [$this, 'ago']), new Twig_SimpleFunction('workspace_skin', [$this, 'workspaceSkin']), new Twig_SimpleFunction('use_icheck', [$this, 'useICheck'], array('is_safe' => array('html'))), new Twig_SimpleFunction('boolean_mark', [$this, 'booleanMark'], array('is_safe' => array('html'))), new Twig_SimpleFunction('empty_boolean_mark', [$this, 'emptyBooleanMark'], array('is_safe' => array('html'))), new Twig_SimpleFunction('callback_transform', [$this, 'callbackTransform'], array('is_safe' => array('html'))), new Twig_SimpleFunction('spath', [$this, 'spath']), new Twig_SimpleFunction('launch', [$this, 'launch'], array('is_safe' => array('html'))), new Twig_SimpleFunction('module_name', function ($id) {
         $module = Modules::get($id);
         return $module['name'];
     }));
 }