| Conditions | 4 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 24 | public function editNode() |
||
| 25 | { |
||
| 26 | $args = arg(); |
||
| 27 | if (count($args) < 2 || ('node' !== $args[0] || $args[1] <= 0)) { |
||
| 28 | throw new \RuntimeException(sprintf('Page "%s" is not a node. Unable to edit.', static::$pageUrl)); |
||
| 29 | } |
||
| 30 | |||
| 31 | $this->getRedirectContext()->visitPage('node/' . $args[1] . '/edit'); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |