src/Controller/ControllerTrait.php
protected function _isActionMapped()
    {
        if (!empty($this->dispatchComponents)) {
            foreach ($this->dispatchComponents as $component => $enabled) {
                if (empty($enabled)) {
                    continue;
                }

                // Skip if isActionMapped isn't defined in the Component
                if (!method_exists($this->{$component}, 'isActionMapped')) {
                    continue;
                }

                // Skip if the action isn't mapped
                if (!$this->{$component}->isActionMapped()) {
                    continue;
                }

                // Skip if execute isn't defined in the Component
                if (!method_exists($this->{$component}, 'execute')) {
                    continue;
                }

                // Return the component instance.
                return $this->{$component};
            }
        }

        return false;
    }
protected function _isActionMapped()
    {
        if (!empty($this->dispatchComponents)) {
            foreach ($this->dispatchComponents as $component => $enabled) {
                if (empty($enabled)) {
                    continue;
                }

                // Skip if isActionMapped isn't defined in the Component
                if (!method_exists($this->{$component}, 'isActionMapped')) {
                    continue;
                }

                // Skip if the action isn't mapped
                if (!$this->{$component}->isActionMapped()) {
                    continue;
                }

                // Skip if execute isn't defined in the Component
                if (!method_exists($this->{$component}, 'execute')) {
                    continue;
                }

                // Return the component instance.
                return $this->{$component};
            }
        }

        return false;
    }
protected function _isActionMapped ( ) { if ( ! empty ( $ this -> dispatchComponents ) ) { foreach ( $ this -> dispatchComponents as $ component => $ enabled ) { if ( empty ( $ enabled ) ) { continue ; } // Skip if isActionMapped isn't defined in the Component if ( ! method_exists ( $ this -> { $ component } , 'isActionMapped' ) ) { continue ; } // Skip if the action isn't mapped if ( ! $ this -> { $ component } -> isActionMapped ( ) ) { continue ; } // Skip if execute isn't defined in the Component if ( ! method_exists ( $ this -> { $ component } , 'execute' ) ) { continue ; } // Return the component instance. return $ this -> { $ component } ; } } return false ; }
Check if an action can be dispatched using CRUD.

@return bool|\Cake\Controller\Component The component instance if action is
mapped else `false`.
Check if an action can be dispatched using CRUD .