コード例 #1
0
 /**
  * gets the current schema object
  *
  * @return schema current schema object
  */
 public function getCurrentSchema()
 {
     $schema = myActionTools::findCurrentSchema();
     if (!$schema) {
         $this->schemaprop = SchemaPropertyPeer::retrieveByPk($this->getRequestParameter('id'));
         if (isset($this->schemaprop)) {
             $schema = $this->schemaprop->getSchema();
             if ($schema) {
                 myActionTools::setLatestSchema($schema->getId());
             }
         }
     }
     $this->forward404Unless($schema, 'No Element Set has been selected.');
     $this->schema = $schema;
     $this->schemaID = $schema->getId();
     return $schema;
 }