1 | <?php |
||
16 | class TemplateBackground extends \yii\db\ActiveRecord |
||
17 | { |
||
18 | /** |
||
19 | * {@inheritdoc} |
||
20 | */ |
||
21 | public static function tableName() |
||
25 | |||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | public function rules() |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | public function attributeLabels() |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public function afterDelete() |
||
59 | |||
60 | /** |
||
61 | * @return \yii\db\ActiveQuery |
||
62 | */ |
||
63 | public function getScreenTemplates() |
||
67 | |||
68 | /** |
||
69 | * Returns Yii usable URL for this background. |
||
70 | * |
||
71 | * @return string url |
||
72 | */ |
||
73 | public function getUri() |
||
77 | |||
78 | /** |
||
79 | * Search background name in file webpath. |
||
80 | * |
||
81 | * @return string name |
||
82 | */ |
||
83 | public function getName() |
||
89 | |||
90 | /** |
||
91 | * Count templatesBackghround currently using this background to decide on file deletion. |
||
92 | * |
||
93 | * @return bool |
||
94 | */ |
||
95 | public function shouldDeleteFile() |
||
99 | |||
100 | /** |
||
101 | * Extract real filepath from background webpath. |
||
102 | * |
||
103 | * @return string file path |
||
104 | */ |
||
105 | public function getRealFilepath() |
||
109 | } |
||
110 |