| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function validate() |
||
| 37 | { |
||
| 38 | parent::validate(); |
||
| 39 | |||
| 40 | if (empty($this->getPageTitle())) { |
||
| 41 | throw new ValidationException('Field "page_title" is required.', ErrorCode::VALIDATION_FIELD_REQUIRED, 'page_title'); |
||
| 42 | } |
||
| 43 | |||
| 44 | if (empty($this->getPageLocation())) { |
||
| 45 | throw new ValidationException('Field "page_location" is required if "value" is set', ErrorCode::VALIDATION_FIELD_REQUIRED, 'page_location'); |
||
| 46 | } |
||
| 47 | |||
| 48 | return true; |
||
| 49 | } |
||
| 51 |