Bundle/WidgetMapBundle/Entity/WidgetMap.php
public function setAction($action)
    {
        //test validity of the action
        if ($action !== self::ACTION_CREATE && $action !== self::ACTION_OVERWRITE && $action !== self::ACTION_DELETE) {
            throw new \Exception('The action of the widget map is not valid. Action: ['.$action.']');
        }

        $this->action = $action;
    }
public function setAction($action)
    {
        //test validity of the action
        if ($action !== self::ACTION_CREATE && $action !== self::ACTION_OVERWRITE && $action !== self::ACTION_DELETE) {
            throw new \Exception('The action of the widget map is not valid. Action: ['.$action.']');
        }

        $this->action = $action;
    }
public function setAction ( $ action ) { //test validity of the action if ( $ action !== self :: ACTION_CREATE && $ action !== self :: ACTION_OVERWRITE && $ action !== self :: ACTION_DELETE ) { throw new \ Exception ( 'The action of the widget map is not valid. Action: [' . $ action . ']' ) ; } $ this -> action = $ action ; }
Set the action.

@param string $action

@throws \Exception The action is not valid
Set the action .