public function __construct(Codendi_Request $request, ProjectManager $project_manager, Project_CustomDescription_CustomDescriptionFactory $custom_description_factory)
 {
     parent::__construct('project', $request);
     $this->project_manager = $project_manager;
     $this->required_custom_descriptions = $custom_description_factory->getRequiredCustomDescriptions();
     $this->creation_request = new Project_OneStepCreation_OneStepCreationRequest($request, $project_manager);
     $this->presenter = new Project_OneStepCreation_OneStepCreationPresenter($this->creation_request, $GLOBALS['LICENSE'], $this->required_custom_descriptions, $project_manager);
 }
 public function __construct(Codendi_Request $request, ProjectManager $project_manager, Project_CustomDescription_CustomDescriptionFactory $custom_description_factory, TroveCatFactory $trove_cat_factory)
 {
     parent::__construct('project', $request);
     $this->project_manager = $project_manager;
     $this->required_custom_descriptions = $custom_description_factory->getRequiredCustomDescriptions();
     $this->trove_cats = $trove_cat_factory->getMandatoryParentCategoriesUnderRootOnlyWhenCategoryHasChildren();
     $this->creation_request = new Project_OneStepCreation_OneStepCreationRequest($request, $project_manager);
     $this->presenter = new Project_OneStepCreation_OneStepCreationPresenter($this->creation_request, $this->required_custom_descriptions, $project_manager, $this->trove_cats);
 }
 private function descriptionFieldExists($field_id_to_update)
 {
     $project_desc_fields = $this->description_factory->getCustomDescription($field_id_to_update);
     if ($project_desc_fields) {
         return true;
     }
     return false;
 }
Exemple #4
0
 $dao = new Statistics_ServicesUsageDao(CodendiDataAccess::instance(), $startDate, $endDate);
 $csv_exporter = new Statistics_Services_UsageFormatter(new Statistics_Formatter($startDate, $endDate, get_csv_separator()));
 //Project admin
 $csv_exporter->buildDatas($dao->getIdsOfActiveProjectsBeforeEndDate(), "Project ID");
 $csv_exporter->buildDatas($dao->getNameOfActiveProjectsBeforeEndDate(), "Project Name");
 $csv_exporter->buildDatas($dao->getShortNameOfActiveProjectsBeforeEndDate(), "Project Short Name");
 $csv_exporter->buildDatas($dao->getPrivacyOfActiveProjectsBeforeEndDate(), "Public Project");
 $csv_exporter->buildDatas($dao->getDescriptionOfActiveProjectsBeforeEndDate(), "Description");
 $csv_exporter->buildDatas($dao->getRegisterTimeOfActiveProjectsBeforeEndDate(), "Creation date");
 $csv_exporter->buildDatas($dao->getInfosFromTroveGroupLink(), "Organization");
 $csv_exporter->buildDatas($dao->getAdministrators(), "Created by");
 $csv_exporter->buildDatas($dao->getAdministratorsRealNames(), "Created by (Real name)");
 $csv_exporter->buildDatas($dao->getAdministratorsEMails(), "Created by (Email)");
 $csv_exporter->buildDatas($dao->getNumberOfUserAddedBetweenStartDateAndEndDate(), "Users added");
 //Custom Descriptions
 $custom_description_factory = new Project_CustomDescription_CustomDescriptionFactory(new Project_CustomDescription_CustomDescriptionDao());
 $custom_description_value_dao = new Project_CustomDescription_CustomDescriptionValueDao();
 foreach ($custom_description_factory->getCustomDescriptions() as $custom_description) {
     $csv_exporter->buildDatas($custom_description_value_dao->getAllDescriptionValues($custom_description->getId()), $custom_description->getLabel());
 }
 //Trove Cats
 $trove_cat_dao = new TroveCatDao();
 $trove_cat_factory = new TroveCatFactory($trove_cat_dao);
 $mandatories_trove_cat = $trove_cat_factory->getMandatoryParentCategoriesUnderRoot();
 foreach ($mandatories_trove_cat as $trove_cat) {
     $csv_exporter->buildDatas($trove_cat_dao->getMandatoryCategorySelectForAllProject($trove_cat->getId()), $trove_cat->getFullname());
 }
 //CVS & SVN
 $csv_exporter->buildDatas($dao->getCVSActivities(), "CVS activities");
 $csv_exporter->buildDatas($dao->getSVNActivities(), "SVN activities");
 //GIT