public function hasAction($actionId)
    {
        $sql = '    SELECT COUNT(method.id) AS cnt
                      FROM fusio_routes_method method
                INNER JOIN fusio_routes routes
                        ON routes.id = method.route_id
                     WHERE routes.status = 1
                       AND method.action = :action_id';

        $count = $this->connection->fetchColumn($sql, [
            'action_id' => $actionId,
        ]);

        return $count > 0;
    }
public function hasAction($actionId)
    {
        $sql = '    SELECT COUNT(method.id) AS cnt
                      FROM fusio_routes_method method
                INNER JOIN fusio_routes routes
                        ON routes.id = method.route_id
                     WHERE routes.status = 1
                       AND method.action = :action_id';

        $count = $this->connection->fetchColumn($sql, [
            'action_id' => $actionId,
        ]);

        return $count > 0;
    }
public function hasAction ( $ actionId ) { $ sql = '    SELECT COUNT(method.id) AS cnt
                      FROM fusio_routes_method method
                INNER JOIN fusio_routes routes
                        ON routes.id = method.route_id
                     WHERE routes.status = 1
                       AND method.action = :action_id' ; $ count = $ this -> connection -> fetchColumn ( $ sql , [ 'action_id' => $ actionId , ] ) ; return $ count > 0 ; }
Returns whether a action id is in use by a route. In the worst case this
gets reported by the database constraints but we use this method to
report a proper error message

@param integer $actionId
@return boolean
Returns whether a action id is in use by a route . In the worst case this gets reported by the database constraints but we use this method to report a proper error message