/** * Returns the list attributes which is connected with another models. * @return array */ public static function getMapReferenceAttributes() { return array('OBJECT' => File::className(), 'VERSION' => Version::className()); }
/** * 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()); }
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(); }
/** * @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)); }
/** * @return array */ public static function getMapReferenceAttributes() { return array('CREATE_USER' => array('class' => User::className(), 'select' => User::getFieldsForSelect()), 'OBJECT' => File::className()); }