Inpsyde\MultilingualPress\Relations\Post\RelationshipController::get_callback PHP Method

get_callback() private method

Returns the appropriate callback for the current action.
private get_callback ( ) : callable
return callable Callback, of null on failure.
    private function get_callback()
    {
        switch ($_REQUEST['action']) {
            case self::ACTION_CONNECT_EXISTING:
                return [$this, 'handle_connect_existing_post'];
            case self::ACTION_CONNECT_NEW:
                return [$this, 'handle_connect_new_post'];
            case self::ACTION_DISCONNECT:
                return [$this, 'handle_disconnect_post'];
        }
        return null;
    }