DetailViewPostSaveController
in package
Tags
Table of Contents
- LIST_CONFIGS = ['estate' => ["option" => "view", "tableName" => "oo_plugin_listviews", "key" => "listview_id"], 'address' => ["option" => "view", "tableName" => "oo_plugin_listviews_address", "key" => "listview_address_id"], 'form' => ["option" => "form", "tableName" => "oo_plugin_forms", "key" => "form_id"]]
- $_pContainer : Container
- $_pRecordReadListView : RecordManagerReadListViewEstate
- $_pRewriteRuleBuilder : RewriteRuleBuilder
- __construct() : mixed
- getAllPost() : mixed
- onMoveTrash() : mixed
- If a post is moved to trash, it gets unpublished first.
- onSavePost() : void
- addPageShortCode() : mixed
- addPageUseShortCode() : mixed
- checkOtherShortcodeInPostContent() : bool
- deletePageShortCode() : mixed
- deletePageUseShortCode() : mixed
- deletePageUseShortCodeWhenUpdatePage() : mixed
- generateDetailViewCode() : string
- generateViewNameOfShortCode() : string
- getListForm() : array<string|int, object>
- getListView() : array<string|int, object>
- getListViewAddress() : array<string|int, mixed>
- postContains() : bool
- postContainsViewName() : bool
Constants
LIST_CONFIGS
public
mixed
LIST_CONFIGS
= ['estate' => ["option" => "view", "tableName" => "oo_plugin_listviews", "key" => "listview_id"], 'address' => ["option" => "view", "tableName" => "oo_plugin_listviews_address", "key" => "listview_address_id"], 'form' => ["option" => "form", "tableName" => "oo_plugin_forms", "key" => "form_id"]]
Properties
$_pContainer
private
Container
$_pContainer
$_pRecordReadListView
private
RecordManagerReadListViewEstate
$_pRecordReadListView
$_pRewriteRuleBuilder
private
RewriteRuleBuilder
$_pRewriteRuleBuilder
Methods
__construct()
public
__construct(RewriteRuleBuilder $pRewriteRuleBuilder) : mixed
Parameters
- $pRewriteRuleBuilder : RewriteRuleBuilder
Tags
Return values
mixed —getAllPost()
public
getAllPost() : mixed
Return values
mixed —onMoveTrash()
If a post is moved to trash, it gets unpublished first.
public
onMoveTrash() : mixed
In case it contains the detail view name we need to remove the ID from the \onOffice\WPlugin\DataView\DataDetailView.
Return values
mixed —onSavePost()
public
onSavePost(int $postId) : void
Parameters
- $postId : int
Return values
void —addPageShortCode()
private
addPageShortCode( $listView, $post, $type) : mixed
Parameters
Return values
mixed —addPageUseShortCode()
private
addPageUseShortCode( $post) : mixed
Parameters
Return values
mixed —checkOtherShortcodeInPostContent()
private
checkOtherShortcodeInPostContent(string $post, string $viewName) : bool
Parameters
- $post : string
- $viewName : string
Return values
bool —deletePageShortCode()
private
deletePageShortCode( $listView, $post, $tableName, $column, $primaKey) : mixed
Parameters
Return values
mixed —deletePageUseShortCode()
private
deletePageUseShortCode( $post) : mixed
Parameters
Return values
mixed —deletePageUseShortCodeWhenUpdatePage()
private
deletePageUseShortCodeWhenUpdatePage(mixed $listView, mixed $pPost) : mixed
Parameters
- $listView : mixed
- $pPost : mixed
Return values
mixed —generateDetailViewCode()
private
generateDetailViewCode(string $detailViewName) : string
Parameters
- $detailViewName : string
Return values
string —generateViewNameOfShortCode()
private
generateViewNameOfShortCode( $viewName, $option) : string
Parameters
Return values
string —getListForm()
private
getListForm() : array<string|int, object>
Return values
array<string|int, object> —getListView()
private
getListView() : array<string|int, object>
Return values
array<string|int, object> —getListViewAddress()
private
getListViewAddress() : array<string|int, mixed>
Return values
array<string|int, mixed> —postContains()
private
postContains( $postContent, $element, $viewShortcodeName) : bool
Parameters
Return values
bool —postContainsViewName()
private
postContainsViewName(string $post, string $viewName) : bool
Parameters
- $post : string
- $viewName : string