Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/constants/DifferentialChangeType.php
| Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | static $icons = array( | ||||
| self::FILE_DELETED => 'fa-file', | self::FILE_DELETED => 'fa-file', | ||||
| self::FILE_NORMAL => 'fa-file-text-o', | self::FILE_NORMAL => 'fa-file-text-o', | ||||
| self::FILE_SUBMODULE => 'fa-folder-open-o', | self::FILE_SUBMODULE => 'fa-folder-open-o', | ||||
| ); | ); | ||||
| return idx($icons, $type, 'fa-file'); | return idx($icons, $type, 'fa-file'); | ||||
| } | } | ||||
| public static function getIconColorForFileType($type) { | |||||
| static $icons = array( | |||||
| self::FILE_TEXT => 'black', | |||||
| self::FILE_IMAGE => 'black', | |||||
| self::FILE_BINARY => 'green', | |||||
| self::FILE_DIRECTORY => 'blue', | |||||
| self::FILE_SYMLINK => 'blue', | |||||
| self::FILE_DELETED => 'red', | |||||
| self::FILE_NORMAL => 'black', | |||||
| self::FILE_SUBMODULE => 'blue', | |||||
| ); | |||||
| return idx($icons, $type, 'black'); | |||||
| } | |||||
| public static function isOldLocationChangeType($type) { | public static function isOldLocationChangeType($type) { | ||||
| static $types = array( | static $types = array( | ||||
| self::TYPE_MOVE_AWAY => true, | self::TYPE_MOVE_AWAY => true, | ||||
| self::TYPE_COPY_AWAY => true, | self::TYPE_COPY_AWAY => true, | ||||
| self::TYPE_MULTICOPY => true, | self::TYPE_MULTICOPY => true, | ||||
| ); | ); | ||||
| return isset($types[$type]); | return isset($types[$type]); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines | |||||