Beispiel #1
0
 /**
  * Returns the list attributes which is connected with another models.
  * @return array
  */
 public static function getMapReferenceAttributes()
 {
     return array('OBJECT' => File::className(), 'VERSION' => Version::className());
 }
Beispiel #2
0
 /**
  * Returns the list attributes which is connected with another models.
  * @return array
  */
 public static function getMapReferenceAttributes()
 {
     return array('CREATE_USER' => array('class' => User::className(), 'select' => User::getFieldsForSelect()), 'FILE' => array('orm_alias' => 'OBJECT', 'class' => File::className()), 'VERSION' => Version::className());
 }
Beispiel #3
0
 protected static function getClassNameModel(array $row)
 {
     if (!isset($row['ID'])) {
         throw new ArgumentTypeException('Invalid ID');
     }
     if (!isset($row['TYPE'])) {
         throw new ArgumentTypeException('Invalid TYPE');
     }
     if (empty($row['REAL_OBJECT_ID']) || $row['REAL_OBJECT_ID'] == $row['ID']) {
         if ($row['TYPE'] == ObjectTable::TYPE_FILE) {
             return File::className();
         }
         return Folder::className();
     }
     if ($row['TYPE'] == ObjectTable::TYPE_FILE) {
         return FileLink::className();
     }
     return FolderLink::className();
 }
Beispiel #4
0
 /**
  * @return array
  */
 public static function getMapReferenceAttributes()
 {
     $userClassName = User::className();
     $fields = User::getFieldsForSelect();
     return array('OBJECT' => File::className(), 'VERSION' => Version::className(), 'USER' => array('class' => $userClassName, 'select' => $fields), 'OWNER' => array('class' => $userClassName, 'select' => $fields));
 }
Beispiel #5
0
 /**
  * @return array
  */
 public static function getMapReferenceAttributes()
 {
     return array('CREATE_USER' => array('class' => User::className(), 'select' => User::getFieldsForSelect()), 'OBJECT' => File::className());
 }