# Actions methods

## getAction( actionName ) <a href="#getaction" id="getaction"></a>

Returns the action with the given actionName.

* **`actionName`** String

**Returns:** [Action](https://cherrycake.tin.cat/version-0.x/reference/core-classes/action) object or false if the action has not been mapped.

## init

Initializes the module, loads the dependent module classes and calls the `mapActions` method on all available modules using [Engine::callMethodOnAllModules](https://cherrycake.tin.cat/version-0.x/core-classes/engine#callmethodonallmodules-methodname).

## isAction( actionName ) <a href="#isaction" id="isaction"></a>

Checks if the action with the given actionName has been mapped.

* **`actionName`** String

**Returns:** Boolean

## mapAction( actionName, action ) <a href="#mapaction" id="mapaction"></a>

Maps an action for a module.

* **`actionName`** String
* **`action`** [Action](https://cherrycake.tin.cat/version-0.x/reference/core-classes/action) object

```php
$e->Actions->mapAction(
    "home",
    new \Cherrycake\Action([
        "moduleType" => \Cherrycake\ACTION_MODULE_TYPE_APP,
        "moduleName" => "Home",
				"methodName" => "homePage",
				"request" => new \Cherrycake\Request([
            "pathComponents" => false,
            "parameters" => false
        ])
    ]);
);
```

## run

Parses the received query to find the corresponding action and runs it
