Ejemplo n.º 1
0
 public static function getMapReferenceAttributes()
 {
     return array('ROOT_OBJECT' => Folder::className());
 }
Ejemplo n.º 2
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();
 }