Exemplo n.º 1
0
 public function executeList()
 {
     $idType = $this->getRequestParameter('IdType', null);
     $id = $this->getRequestParameter('id', null);
     if (!$idType) {
         //a current schema is required to be in the request URL
         myActionTools::requireSchemaFilter();
     } else {
         $this->getRequest()->getParameterHolder()->set($idType, $id);
     }
     $schema = myActionTools::findCurrentSchema();
     if ($schema) {
         $this->schema = $schema;
         $schemaId = $schema->getId();
     } else {
         $import = FileImportHistoryPeer::retrieveByPK($id);
         if ($import) {
             $this->schema = $import->getSchema();
             $schemaId = $this->schema->getId();
         }
     }
     if (in_array($idType, array('schema_property_id', 'schema_property_element_id'))) {
         $property = myActionTools::findCurrentSchemaProperty();
         if ($property) {
             $this->property = $property;
             $this->setFlash('hasProperty', true);
             $schemaId = $this->property->getSchemaId();
         }
     }
     //get the versions array
     $c = new Criteria();
     $c->add(SchemaHasVersionPeer::SCHEMA_ID, $schemaId);
     $versions = SchemaHasVersionPeer::doSelect($c);
     $this->setFlash('versions', $versions);
     parent::executeList();
 }
Exemplo n.º 2
0
 /**
  * extends parent preExecute method
  *
  */
 public function preExecute()
 {
     $this->schema_property = myActionTools::findCurrentSchemaProperty();
     parent::preExecute();
 }