示例#1
0
 protected function addClassBody(&$script)
 {
     parent::addClassBody($script);
     if ($this->getTable()->getAttribute('isI18N')) {
         if (count($this->getTable()->getPrimaryKey()) > 1) {
             throw new Exception('i18n support only works with a single primary key');
         }
         $this->addCultureAccessorMethod($script);
         $this->addCultureMutatorMethod($script);
         $this->addI18nMethods($script);
     }
     if (DataModelBuilder::getBuildProperty('builderAddBehaviors')) {
         $this->addCall($script);
     }
 }
示例#2
0
 /**
  * Specifies the methods that are added as part of the basic OM class.
  * This can be overridden by subclasses that wish to add more methods.
  * @see        ObjectBuilder::addClassBody()
  */
 protected function addClassBody(&$script)
 {
     parent::addClassBody($script);
     $table = $this->getTable();
     $customDataColumn = $table->getColumn(self::KALTURA_COLUMN_CUSTOM_DATA);
     if ($customDataColumn) {
         $this->addCustomDataMethods($script);
     }
 }