/** * @route crew/permissions/{string}/action/{id} * * @param string $cabin * @param string $actionId */ public function editAction(string $cabin, string $actionId) { $actionId = (int) $actionId; if (!\in_array($cabin, $this->getCabinNamespaces())) { \Airship\redirect($this->airship_cabin_prefix . '/crew/permissions'); } $post = $this->post(new SaveActionFilter()); $action = $this->perms->getAction($cabin, $actionId); if (empty($action)) { \Airship\redirect($this->airship_cabin_prefix . '/crew/permissions/' . $cabin); } if (!empty($post)) { if ($this->perms->saveAction($cabin, $actionId, $post)) { \Airship\redirect($this->airship_cabin_prefix . '/crew/permissions/' . $cabin); } } $this->lens('perms/action', ['action' => $action]); }