Пример #1
0
 /** constructor */
 public function __construct()
 {
     parent::__construct();
     $this->_name = 'packages_extension';
     $this->_key = 'extension_id';
     $this->_mainData = array('extension_id' => array('type' => MIDAS_DATA), 'item_id' => array('type' => MIDAS_DATA), 'application_id' => array('type' => MIDAS_DATA), 'os' => array('type' => MIDAS_DATA), 'arch' => array('type' => MIDAS_DATA), 'repository_type' => array('type' => MIDAS_DATA), 'repository_url' => array('type' => MIDAS_DATA), 'revision' => array('type' => MIDAS_DATA), 'submissiontype' => array('type' => MIDAS_DATA), 'packagetype' => array('type' => MIDAS_DATA), 'slicer_revision' => array('type' => MIDAS_DATA), 'icon_url' => array('type' => MIDAS_DATA), 'release' => array('type' => MIDAS_DATA), 'productname' => array('type' => MIDAS_DATA), 'codebase' => array('type' => MIDAS_DATA), 'development_status' => array('type' => MIDAS_DATA), 'category' => array('type' => MIDAS_DATA), 'description' => array('type' => MIDAS_DATA), 'enabled' => array('type' => MIDAS_DATA), 'homepage' => array('type' => MIDAS_DATA), 'screenshots' => array('type' => MIDAS_DATA), 'contributors' => array('type' => MIDAS_DATA), 'item' => array('type' => MIDAS_MANY_TO_ONE, 'model' => 'Item', 'parent_column' => 'item_id', 'child_column' => 'item_id'), 'application' => array('type' => MIDAS_MANY_TO_ONE, 'model' => 'Application', 'module' => 'packages', 'parent_column' => 'application_id', 'child_column' => 'application_id'));
     $this->initialize();
     // required
 }
Пример #2
0
 /** constructor */
 public function __construct()
 {
     parent::__construct();
     $this->_name = 'packages_package';
     $this->_key = 'package_id';
     $this->_mainData = array('package_id' => array('type' => MIDAS_DATA), 'item_id' => array('type' => MIDAS_DATA), 'application_id' => array('type' => MIDAS_DATA), 'os' => array('type' => MIDAS_DATA), 'arch' => array('type' => MIDAS_DATA), 'revision' => array('type' => MIDAS_DATA), 'submissiontype' => array('type' => MIDAS_DATA), 'packagetype' => array('type' => MIDAS_DATA), 'productname' => array('type' => MIDAS_DATA), 'codebase' => array('type' => MIDAS_DATA), 'checkoutdate' => array('type' => MIDAS_DATA), 'release' => array('type' => MIDAS_DATA), 'item' => array('type' => MIDAS_MANY_TO_ONE, 'model' => 'Item', 'parent_column' => 'item_id', 'child_column' => 'item_id'), 'application' => array('type' => MIDAS_MANY_TO_ONE, 'model' => 'Application', 'module' => 'packages', 'parent_column' => 'application_id', 'child_column' => 'application_id'));
     $this->initialize();
     // required
 }
Пример #3
0
 /**
  * Delete the project (deletes all applications within the project as well).
  */
 public function delete($project)
 {
     /** @var Packages_ApplicationModel $applicationModel */
     $applicationModel = MidasLoader::loadModel('Application', 'packages');
     $applications = $project->getApplications();
     foreach ($applications as $application) {
         $applicationModel->delete($application);
     }
     parent::delete($project);
 }
Пример #4
0
 /**
  * Override the save function.
  */
 public function save($application)
 {
     // Strip out unsafe html tags from description
     $application->setDescription(UtilityComponent::filterHtmlTags($application->getDescription()));
     parent::save($application);
 }