public function readonly()
    {
        if (null === $this->readonly) {
            $this->readonly = false;

            // check for <Resource>::hideActions() method.
            if (method_exists($this->module, 'readonly')) {
                $this->readonly = $this->module->readonly();
            }

            // check for <Actions>::readonly() method.
            elseif (method_exists($this->service, 'readonly')) {
                $this->readonly = $this->service->readonly();
            }
        }

        return $this->readonly;
    }