Clickalicious\PhpMemAdmin\App::actionToTemplates PHP Method

actionToTemplates() protected method

Returns a collection in logical order of templates required for passed action.
Author: Benjamin Carl ([email protected])
protected actionToTemplates ( integer $action ) : array
$action integer The action to return templates for
return array An collection of templates in logical order
    protected function actionToTemplates($action)
    {
        switch ($action) {
            case self::ACTION_DASHBOARD:
                $templates = array('header', 'content-cluster-dashboard', 'footer');
                break;
            case self::ACTION_HOST_DETAILS:
                $templates = array('header', 'content-host-dashboard', 'footer');
                break;
            case self::ACTION_DATA_MANAGEMENT:
                $templates = array('header', 'content-data-management', 'footer');
                break;
            case self::ACTION_ABOUT:
                $templates = array('header', 'content-about', 'footer');
                break;
            default:
                $templates = array('403');
                break;
        }
        return $templates;
    }