PHP Class Inpsyde\MultilingualPress\Relations\Post\RelationshipController

Since: 3.0.0
Show file Open project: inpsyde/multilingual-press

Public Methods

Method Description
__construct ( Inpsyde\MultilingualPress\API\ContentRelations $content_relations ) Constructor. Sets up the properties.
handle_connect_existing_post ( ) : void Connects the current post with an existing remote one.
handle_connect_new_post ( ) : void Connects the current post with a new remote one.
handle_disconnect_post ( ) : void Disconnects the current post and the one given in the request.
initialize ( ) : void Initializes the relationship controller.

Private Methods

Method Description
connect_existing_post ( ) : boolean Connects the current post with an existing remote one.
connect_new_post ( ) : boolean | WP_Erro\WP_Error Connects the current post with a new remote one.
disconnect_post ( ) : void Disconnects the current post with the one given in the request.
get_callback ( ) : callable Returns the appropriate callback for the current action.
get_real_post_type ( WP_Post $post ) : string Returns the post type of the "real" post according to the given one.

Method Details

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( Inpsyde\MultilingualPress\API\ContentRelations $content_relations )
$content_relations Inpsyde\MultilingualPress\API\ContentRelations Content relations API object.

handle_connect_existing_post() public method

Connects the current post with an existing remote one.
Since: 3.0.0
public handle_connect_existing_post ( ) : void
return void

handle_connect_new_post() public method

Connects the current post with a new remote one.
Since: 3.0.0
public handle_connect_new_post ( ) : void
return void

handle_disconnect_post() public method

Disconnects the current post and the one given in the request.
Since: 3.0.0
public handle_disconnect_post ( ) : void
return void

initialize() public method

Initializes the relationship controller.
Since: 3.0.0
public initialize ( ) : void
return void