@@ -17,32 +17,32 @@ |
||
| 17 | 17 | class Locale extends JsonDataNode |
| 18 | 18 | { |
| 19 | 19 | |
| 20 | - const NODE_NAME = 'locale'; |
|
| 20 | + const NODE_NAME = 'locale'; |
|
| 21 | 21 | |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * JsonDataNodeHandler constructor. |
|
| 25 | - * |
|
| 26 | - * @param JsonDataNodeValidator $validator |
|
| 27 | - */ |
|
| 28 | - public function __construct(JsonDataNodeValidator $validator) |
|
| 29 | - { |
|
| 30 | - parent::__construct($validator); |
|
| 31 | - $this->setNodeName(Locale::NODE_NAME); |
|
| 32 | - } |
|
| 23 | + /** |
|
| 24 | + * JsonDataNodeHandler constructor. |
|
| 25 | + * |
|
| 26 | + * @param JsonDataNodeValidator $validator |
|
| 27 | + */ |
|
| 28 | + public function __construct(JsonDataNodeValidator $validator) |
|
| 29 | + { |
|
| 30 | + parent::__construct($validator); |
|
| 31 | + $this->setNodeName(Locale::NODE_NAME); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * @inheritDoc |
|
| 36 | - */ |
|
| 37 | - public function initialize() |
|
| 38 | - { |
|
| 39 | - $this->addData('user', get_user_locale()); |
|
| 40 | - $this->addData('site', get_locale()); |
|
| 41 | - $this->addData('siteTimezone', [ |
|
| 42 | - 'city' => EEH_DTT_Helper::get_timezone_string_for_display(), |
|
| 43 | - 'name' => get_option('timezone_string'), |
|
| 44 | - 'offset' => EEH_DTT_Helper::get_site_timezone_gmt_offset(), |
|
| 45 | - ]); |
|
| 46 | - $this->setInitialized(true); |
|
| 47 | - } |
|
| 34 | + /** |
|
| 35 | + * @inheritDoc |
|
| 36 | + */ |
|
| 37 | + public function initialize() |
|
| 38 | + { |
|
| 39 | + $this->addData('user', get_user_locale()); |
|
| 40 | + $this->addData('site', get_locale()); |
|
| 41 | + $this->addData('siteTimezone', [ |
|
| 42 | + 'city' => EEH_DTT_Helper::get_timezone_string_for_display(), |
|
| 43 | + 'name' => get_option('timezone_string'), |
|
| 44 | + 'offset' => EEH_DTT_Helper::get_site_timezone_gmt_offset(), |
|
| 45 | + ]); |
|
| 46 | + $this->setInitialized(true); |
|
| 47 | + } |
|
| 48 | 48 | } |
| 49 | 49 | \ No newline at end of file |
@@ -23,82 +23,82 @@ |
||
| 23 | 23 | class Config extends JsonDataNode |
| 24 | 24 | { |
| 25 | 25 | |
| 26 | - const NODE_NAME = 'config'; |
|
| 26 | + const NODE_NAME = 'config'; |
|
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * @var CurrentUser $current_user |
|
| 30 | - */ |
|
| 31 | - private $current_user; |
|
| 28 | + /** |
|
| 29 | + * @var CurrentUser $current_user |
|
| 30 | + */ |
|
| 31 | + private $current_user; |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * @var EspressoCoreDomain $core_domain |
|
| 35 | - */ |
|
| 36 | - private $core_domain; |
|
| 33 | + /** |
|
| 34 | + * @var EspressoCoreDomain $core_domain |
|
| 35 | + */ |
|
| 36 | + private $core_domain; |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * @var GeneralSettings $general_settings |
|
| 40 | - */ |
|
| 41 | - private $general_settings; |
|
| 38 | + /** |
|
| 39 | + * @var GeneralSettings $general_settings |
|
| 40 | + */ |
|
| 41 | + private $general_settings; |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * @var Locale $locale |
|
| 45 | - */ |
|
| 46 | - private $locale; |
|
| 43 | + /** |
|
| 44 | + * @var Locale $locale |
|
| 45 | + */ |
|
| 46 | + private $locale; |
|
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * @var SiteCurrency $site_currency |
|
| 50 | - */ |
|
| 51 | - private $site_currency; |
|
| 48 | + /** |
|
| 49 | + * @var SiteCurrency $site_currency |
|
| 50 | + */ |
|
| 51 | + private $site_currency; |
|
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * @var SiteUrls $site_urls |
|
| 55 | - */ |
|
| 56 | - private $site_urls; |
|
| 53 | + /** |
|
| 54 | + * @var SiteUrls $site_urls |
|
| 55 | + */ |
|
| 56 | + private $site_urls; |
|
| 57 | 57 | |
| 58 | 58 | |
| 59 | - /** |
|
| 60 | - * JsonDataNode constructor. |
|
| 61 | - * |
|
| 62 | - * @param CurrentUser $current_user |
|
| 63 | - * @param EspressoCoreDomain $core_domain |
|
| 64 | - * @param GeneralSettings $general_settings |
|
| 65 | - * @param Locale $locale |
|
| 66 | - * @param SiteCurrency $site_currency |
|
| 67 | - * @param SiteUrls $site_urls |
|
| 68 | - * @param JsonDataNodeValidator $validator |
|
| 69 | - */ |
|
| 70 | - public function __construct( |
|
| 71 | - CurrentUser $current_user, |
|
| 72 | - EspressoCoreDomain $core_domain, |
|
| 73 | - GeneralSettings $general_settings, |
|
| 74 | - Locale $locale, |
|
| 75 | - SiteCurrency $site_currency, |
|
| 76 | - SiteUrls $site_urls, |
|
| 77 | - JsonDataNodeValidator $validator |
|
| 78 | - ) { |
|
| 79 | - parent::__construct($validator); |
|
| 80 | - $this->current_user = $current_user; |
|
| 81 | - $this->core_domain = $core_domain; |
|
| 82 | - $this->general_settings = $general_settings; |
|
| 83 | - $this->locale = $locale; |
|
| 84 | - $this->site_currency = $site_currency; |
|
| 85 | - $this->site_urls = $site_urls; |
|
| 86 | - $this->setNodeName(Config::NODE_NAME); |
|
| 87 | - } |
|
| 59 | + /** |
|
| 60 | + * JsonDataNode constructor. |
|
| 61 | + * |
|
| 62 | + * @param CurrentUser $current_user |
|
| 63 | + * @param EspressoCoreDomain $core_domain |
|
| 64 | + * @param GeneralSettings $general_settings |
|
| 65 | + * @param Locale $locale |
|
| 66 | + * @param SiteCurrency $site_currency |
|
| 67 | + * @param SiteUrls $site_urls |
|
| 68 | + * @param JsonDataNodeValidator $validator |
|
| 69 | + */ |
|
| 70 | + public function __construct( |
|
| 71 | + CurrentUser $current_user, |
|
| 72 | + EspressoCoreDomain $core_domain, |
|
| 73 | + GeneralSettings $general_settings, |
|
| 74 | + Locale $locale, |
|
| 75 | + SiteCurrency $site_currency, |
|
| 76 | + SiteUrls $site_urls, |
|
| 77 | + JsonDataNodeValidator $validator |
|
| 78 | + ) { |
|
| 79 | + parent::__construct($validator); |
|
| 80 | + $this->current_user = $current_user; |
|
| 81 | + $this->core_domain = $core_domain; |
|
| 82 | + $this->general_settings = $general_settings; |
|
| 83 | + $this->locale = $locale; |
|
| 84 | + $this->site_currency = $site_currency; |
|
| 85 | + $this->site_urls = $site_urls; |
|
| 86 | + $this->setNodeName(Config::NODE_NAME); |
|
| 87 | + } |
|
| 88 | 88 | |
| 89 | 89 | |
| 90 | - /** |
|
| 91 | - * @throws DomainException |
|
| 92 | - * @since $VID:$ |
|
| 93 | - */ |
|
| 94 | - public function initialize() |
|
| 95 | - { |
|
| 96 | - $this->addDataNode($this->core_domain); |
|
| 97 | - $this->addDataNode($this->site_currency); |
|
| 98 | - $this->addDataNode($this->current_user); |
|
| 99 | - $this->addDataNode($this->general_settings); |
|
| 100 | - $this->addDataNode($this->locale); |
|
| 101 | - $this->addDataNode($this->site_urls); |
|
| 102 | - $this->setInitialized(true); |
|
| 103 | - } |
|
| 90 | + /** |
|
| 91 | + * @throws DomainException |
|
| 92 | + * @since $VID:$ |
|
| 93 | + */ |
|
| 94 | + public function initialize() |
|
| 95 | + { |
|
| 96 | + $this->addDataNode($this->core_domain); |
|
| 97 | + $this->addDataNode($this->site_currency); |
|
| 98 | + $this->addDataNode($this->current_user); |
|
| 99 | + $this->addDataNode($this->general_settings); |
|
| 100 | + $this->addDataNode($this->locale); |
|
| 101 | + $this->addDataNode($this->site_urls); |
|
| 102 | + $this->setInitialized(true); |
|
| 103 | + } |
|
| 104 | 104 | } |
@@ -19,34 +19,34 @@ |
||
| 19 | 19 | class Api extends JsonDataNode |
| 20 | 20 | { |
| 21 | 21 | |
| 22 | - const NODE_NAME = 'api'; |
|
| 23 | - |
|
| 24 | - |
|
| 25 | - /** |
|
| 26 | - * JsonDataNodeHandler constructor. |
|
| 27 | - * |
|
| 28 | - * @param JsonDataNodeValidator $validator |
|
| 29 | - */ |
|
| 30 | - public function __construct(JsonDataNodeValidator $validator) |
|
| 31 | - { |
|
| 32 | - parent::__construct($validator); |
|
| 33 | - $this->setNodeName(Api::NODE_NAME); |
|
| 34 | - } |
|
| 35 | - |
|
| 36 | - |
|
| 37 | - /** |
|
| 38 | - * @throws DomainException |
|
| 39 | - * @since $VID:$ |
|
| 40 | - */ |
|
| 41 | - public function initialize() |
|
| 42 | - { |
|
| 43 | - $this->addData('restApiNonce', wp_create_nonce('wp_rest')); |
|
| 44 | - $this->addData('restApiBaseUrl', rest_url()); |
|
| 45 | - $this->addData('restApiRouteUrl', rest_url('ee/v4.8.36/')); |
|
| 46 | - $this->addData('restApiCollectionEndpoints', EED_Core_Rest_Api::getCollectionRoutesIndexedByModelName()); |
|
| 47 | - $this->addData('restApiPrimaryKeys', EED_Core_Rest_Api::getPrimaryKeyNamesIndexedByModelName()); |
|
| 48 | - $graphqlEndpoint = class_exists('WPGraphQL') ? trailingslashit(site_url()) . Router::$route : ''; |
|
| 49 | - $this->addData('graphqlEndpoint', esc_url($graphqlEndpoint)); |
|
| 50 | - $this->setInitialized(true); |
|
| 51 | - } |
|
| 22 | + const NODE_NAME = 'api'; |
|
| 23 | + |
|
| 24 | + |
|
| 25 | + /** |
|
| 26 | + * JsonDataNodeHandler constructor. |
|
| 27 | + * |
|
| 28 | + * @param JsonDataNodeValidator $validator |
|
| 29 | + */ |
|
| 30 | + public function __construct(JsonDataNodeValidator $validator) |
|
| 31 | + { |
|
| 32 | + parent::__construct($validator); |
|
| 33 | + $this->setNodeName(Api::NODE_NAME); |
|
| 34 | + } |
|
| 35 | + |
|
| 36 | + |
|
| 37 | + /** |
|
| 38 | + * @throws DomainException |
|
| 39 | + * @since $VID:$ |
|
| 40 | + */ |
|
| 41 | + public function initialize() |
|
| 42 | + { |
|
| 43 | + $this->addData('restApiNonce', wp_create_nonce('wp_rest')); |
|
| 44 | + $this->addData('restApiBaseUrl', rest_url()); |
|
| 45 | + $this->addData('restApiRouteUrl', rest_url('ee/v4.8.36/')); |
|
| 46 | + $this->addData('restApiCollectionEndpoints', EED_Core_Rest_Api::getCollectionRoutesIndexedByModelName()); |
|
| 47 | + $this->addData('restApiPrimaryKeys', EED_Core_Rest_Api::getPrimaryKeyNamesIndexedByModelName()); |
|
| 48 | + $graphqlEndpoint = class_exists('WPGraphQL') ? trailingslashit(site_url()) . Router::$route : ''; |
|
| 49 | + $this->addData('graphqlEndpoint', esc_url($graphqlEndpoint)); |
|
| 50 | + $this->setInitialized(true); |
|
| 51 | + } |
|
| 52 | 52 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $this->addData('restApiRouteUrl', rest_url('ee/v4.8.36/')); |
| 46 | 46 | $this->addData('restApiCollectionEndpoints', EED_Core_Rest_Api::getCollectionRoutesIndexedByModelName()); |
| 47 | 47 | $this->addData('restApiPrimaryKeys', EED_Core_Rest_Api::getPrimaryKeyNamesIndexedByModelName()); |
| 48 | - $graphqlEndpoint = class_exists('WPGraphQL') ? trailingslashit(site_url()) . Router::$route : ''; |
|
| 48 | + $graphqlEndpoint = class_exists('WPGraphQL') ? trailingslashit(site_url()).Router::$route : ''; |
|
| 49 | 49 | $this->addData('graphqlEndpoint', esc_url($graphqlEndpoint)); |
| 50 | 50 | $this->setInitialized(true); |
| 51 | 51 | } |
@@ -21,52 +21,52 @@ |
||
| 21 | 21 | class EventEspressoData extends PrimaryJsonDataNode |
| 22 | 22 | { |
| 23 | 23 | |
| 24 | - const NODE_NAME = 'eventEspressoData'; |
|
| 24 | + const NODE_NAME = 'eventEspressoData'; |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * @var Api $api |
|
| 28 | - */ |
|
| 29 | - private $api; |
|
| 26 | + /** |
|
| 27 | + * @var Api $api |
|
| 28 | + */ |
|
| 29 | + private $api; |
|
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * @var Config $config |
|
| 33 | - */ |
|
| 34 | - private $config; |
|
| 31 | + /** |
|
| 32 | + * @var Config $config |
|
| 33 | + */ |
|
| 34 | + private $config; |
|
| 35 | 35 | |
| 36 | - /** |
|
| 37 | - * @var JedLocaleData $jed_locale |
|
| 38 | - */ |
|
| 39 | - private $jed_locale; |
|
| 36 | + /** |
|
| 37 | + * @var JedLocaleData $jed_locale |
|
| 38 | + */ |
|
| 39 | + private $jed_locale; |
|
| 40 | 40 | |
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * JsonDataNodeHandler constructor. |
|
| 44 | - * |
|
| 45 | - * @param Api $api |
|
| 46 | - * @param Config $config |
|
| 47 | - * @param JedLocaleData $jed_locale |
|
| 48 | - * @param JsonDataNodeValidator $validator |
|
| 49 | - */ |
|
| 50 | - public function __construct(Api $api, Config $config, JedLocaleData $jed_locale, JsonDataNodeValidator $validator) |
|
| 51 | - { |
|
| 52 | - parent::__construct($validator); |
|
| 53 | - $this->api = $api; |
|
| 54 | - $this->config = $config; |
|
| 55 | - $this->jed_locale = $jed_locale; |
|
| 56 | - $this->setNodeName(EventEspressoData::NODE_NAME); |
|
| 57 | - $this->setTargetScript(EspressoCoreAppAssetManager::JS_HANDLE_EDITOR); |
|
| 58 | - } |
|
| 42 | + /** |
|
| 43 | + * JsonDataNodeHandler constructor. |
|
| 44 | + * |
|
| 45 | + * @param Api $api |
|
| 46 | + * @param Config $config |
|
| 47 | + * @param JedLocaleData $jed_locale |
|
| 48 | + * @param JsonDataNodeValidator $validator |
|
| 49 | + */ |
|
| 50 | + public function __construct(Api $api, Config $config, JedLocaleData $jed_locale, JsonDataNodeValidator $validator) |
|
| 51 | + { |
|
| 52 | + parent::__construct($validator); |
|
| 53 | + $this->api = $api; |
|
| 54 | + $this->config = $config; |
|
| 55 | + $this->jed_locale = $jed_locale; |
|
| 56 | + $this->setNodeName(EventEspressoData::NODE_NAME); |
|
| 57 | + $this->setTargetScript(EspressoCoreAppAssetManager::JS_HANDLE_EDITOR); |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * @throws DomainException |
|
| 63 | - * @since $VID:$ |
|
| 64 | - */ |
|
| 65 | - public function initialize() |
|
| 66 | - { |
|
| 67 | - $this->addDataNode($this->api); |
|
| 68 | - $this->addDataNode($this->config); |
|
| 69 | - $this->addData('i18n', $this->jed_locale->getData('event_espresso')); |
|
| 70 | - $this->setInitialized(true); |
|
| 71 | - } |
|
| 61 | + /** |
|
| 62 | + * @throws DomainException |
|
| 63 | + * @since $VID:$ |
|
| 64 | + */ |
|
| 65 | + public function initialize() |
|
| 66 | + { |
|
| 67 | + $this->addDataNode($this->api); |
|
| 68 | + $this->addDataNode($this->config); |
|
| 69 | + $this->addData('i18n', $this->jed_locale->getData('event_espresso')); |
|
| 70 | + $this->setInitialized(true); |
|
| 71 | + } |
|
| 72 | 72 | } |
@@ -20,46 +20,46 @@ |
||
| 20 | 20 | class EventEditor extends JsonDataNode |
| 21 | 21 | { |
| 22 | 22 | |
| 23 | - const NODE_NAME = 'eventEditor'; |
|
| 23 | + const NODE_NAME = 'eventEditor'; |
|
| 24 | 24 | |
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * @var EventEditorGraphQLData |
|
| 28 | - */ |
|
| 29 | - protected $event_editor_gql_data; |
|
| 26 | + /** |
|
| 27 | + * @var EventEditorGraphQLData |
|
| 28 | + */ |
|
| 29 | + protected $event_editor_gql_data; |
|
| 30 | 30 | |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * EventEditor JsonDataNode constructor. |
|
| 34 | - * |
|
| 35 | - * @param EventEditorGraphQLData $event_editor_gql_data |
|
| 36 | - * @param JsonDataNodeValidator $validator |
|
| 37 | - */ |
|
| 38 | - public function __construct( |
|
| 39 | - EventEditorGraphQLData $event_editor_gql_data, |
|
| 40 | - JsonDataNodeValidator $validator |
|
| 41 | - ) { |
|
| 42 | - parent::__construct($validator); |
|
| 43 | - $this->event_editor_gql_data = $event_editor_gql_data; |
|
| 44 | - $this->setDomain(EventEditor::NODE_NAME); |
|
| 45 | - $this->setNodeName(EventEditor::NODE_NAME); |
|
| 46 | - } |
|
| 32 | + /** |
|
| 33 | + * EventEditor JsonDataNode constructor. |
|
| 34 | + * |
|
| 35 | + * @param EventEditorGraphQLData $event_editor_gql_data |
|
| 36 | + * @param JsonDataNodeValidator $validator |
|
| 37 | + */ |
|
| 38 | + public function __construct( |
|
| 39 | + EventEditorGraphQLData $event_editor_gql_data, |
|
| 40 | + JsonDataNodeValidator $validator |
|
| 41 | + ) { |
|
| 42 | + parent::__construct($validator); |
|
| 43 | + $this->event_editor_gql_data = $event_editor_gql_data; |
|
| 44 | + $this->setDomain(EventEditor::NODE_NAME); |
|
| 45 | + $this->setNodeName(EventEditor::NODE_NAME); |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * @throws EE_Error |
|
| 51 | - * @throws ReflectionException |
|
| 52 | - * @since $VID:$ |
|
| 53 | - */ |
|
| 54 | - public function initialize() |
|
| 55 | - { |
|
| 56 | - global $post; |
|
| 57 | - $eventId = isset($_REQUEST['post']) ? absint($_REQUEST['post']) : 0; |
|
| 58 | - // if there's no event ID but there IS a WP Post... then use the Post ID |
|
| 59 | - $use_post_id = $eventId === 0 && $post instanceof WP_Post && $post->post_type === 'espresso_events'; |
|
| 60 | - $eventId = $use_post_id ? $post->ID : $eventId; |
|
| 61 | - $event = $this->event_editor_gql_data->getData($eventId); |
|
| 62 | - $event['dbId'] = $eventId; |
|
| 63 | - $this->addData('event', $event); |
|
| 64 | - } |
|
| 49 | + /** |
|
| 50 | + * @throws EE_Error |
|
| 51 | + * @throws ReflectionException |
|
| 52 | + * @since $VID:$ |
|
| 53 | + */ |
|
| 54 | + public function initialize() |
|
| 55 | + { |
|
| 56 | + global $post; |
|
| 57 | + $eventId = isset($_REQUEST['post']) ? absint($_REQUEST['post']) : 0; |
|
| 58 | + // if there's no event ID but there IS a WP Post... then use the Post ID |
|
| 59 | + $use_post_id = $eventId === 0 && $post instanceof WP_Post && $post->post_type === 'espresso_events'; |
|
| 60 | + $eventId = $use_post_id ? $post->ID : $eventId; |
|
| 61 | + $event = $this->event_editor_gql_data->getData($eventId); |
|
| 62 | + $event['dbId'] = $eventId; |
|
| 63 | + $this->addData('event', $event); |
|
| 64 | + } |
|
| 65 | 65 | } |
| 66 | 66 | \ No newline at end of file |
@@ -17,37 +17,37 @@ |
||
| 17 | 17 | class WordPressPluginsPageData extends JsonDataNode |
| 18 | 18 | { |
| 19 | 19 | |
| 20 | - const NODE_NAME = 'wpPluginsPage'; |
|
| 21 | - |
|
| 22 | - /** |
|
| 23 | - * @var ExitModal $exit_modal |
|
| 24 | - */ |
|
| 25 | - private $exit_modal; |
|
| 26 | - |
|
| 27 | - |
|
| 28 | - /** |
|
| 29 | - * WordPressPluginsPageData JsonDataNode constructor. |
|
| 30 | - * |
|
| 31 | - * @param ExitModal $exit_modal |
|
| 32 | - * @param JsonDataNodeValidator $validator |
|
| 33 | - */ |
|
| 34 | - public function __construct( |
|
| 35 | - ExitModal $exit_modal, |
|
| 36 | - JsonDataNodeValidator $validator |
|
| 37 | - ) { |
|
| 38 | - parent::__construct($validator); |
|
| 39 | - $this->exit_modal = $exit_modal; |
|
| 40 | - $this->setDomain(WordPressPluginsPageData::NODE_NAME); |
|
| 41 | - $this->setNodeName(WordPressPluginsPageData::NODE_NAME); |
|
| 42 | - } |
|
| 43 | - |
|
| 44 | - |
|
| 45 | - /** |
|
| 46 | - * @inheritDoc |
|
| 47 | - */ |
|
| 48 | - public function initialize() |
|
| 49 | - { |
|
| 50 | - $data = $this->exit_modal->getExitSurveyInfo(); |
|
| 51 | - $this->addData('eeExitSurveyInfo', $data); |
|
| 52 | - } |
|
| 20 | + const NODE_NAME = 'wpPluginsPage'; |
|
| 21 | + |
|
| 22 | + /** |
|
| 23 | + * @var ExitModal $exit_modal |
|
| 24 | + */ |
|
| 25 | + private $exit_modal; |
|
| 26 | + |
|
| 27 | + |
|
| 28 | + /** |
|
| 29 | + * WordPressPluginsPageData JsonDataNode constructor. |
|
| 30 | + * |
|
| 31 | + * @param ExitModal $exit_modal |
|
| 32 | + * @param JsonDataNodeValidator $validator |
|
| 33 | + */ |
|
| 34 | + public function __construct( |
|
| 35 | + ExitModal $exit_modal, |
|
| 36 | + JsonDataNodeValidator $validator |
|
| 37 | + ) { |
|
| 38 | + parent::__construct($validator); |
|
| 39 | + $this->exit_modal = $exit_modal; |
|
| 40 | + $this->setDomain(WordPressPluginsPageData::NODE_NAME); |
|
| 41 | + $this->setNodeName(WordPressPluginsPageData::NODE_NAME); |
|
| 42 | + } |
|
| 43 | + |
|
| 44 | + |
|
| 45 | + /** |
|
| 46 | + * @inheritDoc |
|
| 47 | + */ |
|
| 48 | + public function initialize() |
|
| 49 | + { |
|
| 50 | + $data = $this->exit_modal->getExitSurveyInfo(); |
|
| 51 | + $this->addData('eeExitSurveyInfo', $data); |
|
| 52 | + } |
|
| 53 | 53 | } |
| 54 | 54 | \ No newline at end of file |
@@ -16,84 +16,84 @@ |
||
| 16 | 16 | class PersonalDataRequests extends PublicRoute |
| 17 | 17 | { |
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * returns true if the current request matches this route |
|
| 21 | - * |
|
| 22 | - * @return bool |
|
| 23 | - * @since $VID:$ |
|
| 24 | - */ |
|
| 25 | - public function matchesCurrentRequest() |
|
| 26 | - { |
|
| 27 | - return ($this->request->isAdmin() || $this->request->isAjax()) && $this->maintenance_mode->models_can_query(); |
|
| 28 | - } |
|
| 19 | + /** |
|
| 20 | + * returns true if the current request matches this route |
|
| 21 | + * |
|
| 22 | + * @return bool |
|
| 23 | + * @since $VID:$ |
|
| 24 | + */ |
|
| 25 | + public function matchesCurrentRequest() |
|
| 26 | + { |
|
| 27 | + return ($this->request->isAdmin() || $this->request->isAjax()) && $this->maintenance_mode->models_can_query(); |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * @since $VID:$ |
|
| 33 | - */ |
|
| 34 | - protected function registerDependencies() |
|
| 35 | - { |
|
| 36 | - $this->dependency_map->registerDependencies( |
|
| 37 | - 'EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy', |
|
| 38 | - [ |
|
| 39 | - 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache, |
|
| 40 | - 'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache |
|
| 41 | - ] |
|
| 42 | - ); |
|
| 43 | - $this->dependency_map->registerDependencies( |
|
| 44 | - 'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendee', |
|
| 45 | - ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 46 | - ); |
|
| 47 | - $this->dependency_map->registerDependencies( |
|
| 48 | - 'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendeeBillingData', |
|
| 49 | - [ |
|
| 50 | - 'EEM_Attendee' => EE_Dependency_Map::load_from_cache, |
|
| 51 | - 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache |
|
| 52 | - ] |
|
| 53 | - ); |
|
| 54 | - $this->dependency_map->registerDependencies( |
|
| 55 | - 'EventEspresso\core\domain\services\admin\privacy\export\ExportCheckins', |
|
| 56 | - ['EEM_Checkin' => EE_Dependency_Map::load_from_cache] |
|
| 57 | - ); |
|
| 58 | - $this->dependency_map->registerDependencies( |
|
| 59 | - 'EventEspresso\core\domain\services\admin\privacy\export\ExportRegistration', |
|
| 60 | - ['EEM_Registration' => EE_Dependency_Map::load_from_cache] |
|
| 61 | - ); |
|
| 62 | - $this->dependency_map->registerDependencies( |
|
| 63 | - 'EventEspresso\core\domain\services\admin\privacy\export\ExportTransaction', |
|
| 64 | - ['EEM_Transaction' => EE_Dependency_Map::load_from_cache] |
|
| 65 | - ); |
|
| 66 | - $this->dependency_map->registerDependencies( |
|
| 67 | - 'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAttendeeData', |
|
| 68 | - ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 69 | - ); |
|
| 70 | - $this->dependency_map->registerDependencies( |
|
| 71 | - 'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAnswers', |
|
| 72 | - [ |
|
| 73 | - 'EEM_Answer' => EE_Dependency_Map::load_from_cache, |
|
| 74 | - 'EEM_Question' => EE_Dependency_Map::load_from_cache, |
|
| 75 | - ] |
|
| 76 | - ); |
|
| 77 | - $this->dependency_map->registerDependencies( |
|
| 78 | - 'EventEspresso\core\domain\services\admin\privacy\forms\PrivacySettingsFormHandler', |
|
| 79 | - [ |
|
| 80 | - 'EE_Registry' => EE_Dependency_Map::load_from_cache, |
|
| 81 | - 'EE_Config' => EE_Dependency_Map::load_from_cache |
|
| 82 | - ] |
|
| 83 | - ); |
|
| 84 | - } |
|
| 31 | + /** |
|
| 32 | + * @since $VID:$ |
|
| 33 | + */ |
|
| 34 | + protected function registerDependencies() |
|
| 35 | + { |
|
| 36 | + $this->dependency_map->registerDependencies( |
|
| 37 | + 'EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy', |
|
| 38 | + [ |
|
| 39 | + 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache, |
|
| 40 | + 'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache |
|
| 41 | + ] |
|
| 42 | + ); |
|
| 43 | + $this->dependency_map->registerDependencies( |
|
| 44 | + 'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendee', |
|
| 45 | + ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 46 | + ); |
|
| 47 | + $this->dependency_map->registerDependencies( |
|
| 48 | + 'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendeeBillingData', |
|
| 49 | + [ |
|
| 50 | + 'EEM_Attendee' => EE_Dependency_Map::load_from_cache, |
|
| 51 | + 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache |
|
| 52 | + ] |
|
| 53 | + ); |
|
| 54 | + $this->dependency_map->registerDependencies( |
|
| 55 | + 'EventEspresso\core\domain\services\admin\privacy\export\ExportCheckins', |
|
| 56 | + ['EEM_Checkin' => EE_Dependency_Map::load_from_cache] |
|
| 57 | + ); |
|
| 58 | + $this->dependency_map->registerDependencies( |
|
| 59 | + 'EventEspresso\core\domain\services\admin\privacy\export\ExportRegistration', |
|
| 60 | + ['EEM_Registration' => EE_Dependency_Map::load_from_cache] |
|
| 61 | + ); |
|
| 62 | + $this->dependency_map->registerDependencies( |
|
| 63 | + 'EventEspresso\core\domain\services\admin\privacy\export\ExportTransaction', |
|
| 64 | + ['EEM_Transaction' => EE_Dependency_Map::load_from_cache] |
|
| 65 | + ); |
|
| 66 | + $this->dependency_map->registerDependencies( |
|
| 67 | + 'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAttendeeData', |
|
| 68 | + ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 69 | + ); |
|
| 70 | + $this->dependency_map->registerDependencies( |
|
| 71 | + 'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAnswers', |
|
| 72 | + [ |
|
| 73 | + 'EEM_Answer' => EE_Dependency_Map::load_from_cache, |
|
| 74 | + 'EEM_Question' => EE_Dependency_Map::load_from_cache, |
|
| 75 | + ] |
|
| 76 | + ); |
|
| 77 | + $this->dependency_map->registerDependencies( |
|
| 78 | + 'EventEspresso\core\domain\services\admin\privacy\forms\PrivacySettingsFormHandler', |
|
| 79 | + [ |
|
| 80 | + 'EE_Registry' => EE_Dependency_Map::load_from_cache, |
|
| 81 | + 'EE_Config' => EE_Dependency_Map::load_from_cache |
|
| 82 | + ] |
|
| 83 | + ); |
|
| 84 | + } |
|
| 85 | 85 | |
| 86 | 86 | |
| 87 | - /** |
|
| 88 | - * implements logic required to run during request |
|
| 89 | - * |
|
| 90 | - * @return bool |
|
| 91 | - * @since $VID:$ |
|
| 92 | - */ |
|
| 93 | - protected function requestHandler() |
|
| 94 | - { |
|
| 95 | - $this->loader->getShared('EventEspresso\core\services\privacy\erasure\PersonalDataEraserManager'); |
|
| 96 | - $this->loader->getShared('EventEspresso\core\services\privacy\export\PersonalDataExporterManager'); |
|
| 97 | - return true; |
|
| 98 | - } |
|
| 87 | + /** |
|
| 88 | + * implements logic required to run during request |
|
| 89 | + * |
|
| 90 | + * @return bool |
|
| 91 | + * @since $VID:$ |
|
| 92 | + */ |
|
| 93 | + protected function requestHandler() |
|
| 94 | + { |
|
| 95 | + $this->loader->getShared('EventEspresso\core\services\privacy\erasure\PersonalDataEraserManager'); |
|
| 96 | + $this->loader->getShared('EventEspresso\core\services\privacy\export\PersonalDataExporterManager'); |
|
| 97 | + return true; |
|
| 98 | + } |
|
| 99 | 99 | } |
@@ -15,38 +15,38 @@ |
||
| 15 | 15 | class EspressoEventsAdmin extends AdminRoute |
| 16 | 16 | { |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * returns true if the current request matches this route |
|
| 20 | - * |
|
| 21 | - * @return bool |
|
| 22 | - * @since $VID:$ |
|
| 23 | - */ |
|
| 24 | - public function matchesCurrentRequest() |
|
| 25 | - { |
|
| 26 | - return parent::matchesCurrentRequest() && $this->request->getRequestParam('page') === 'espresso_events'; |
|
| 27 | - } |
|
| 28 | - |
|
| 29 | - |
|
| 30 | - /** |
|
| 31 | - * @since $VID:$ |
|
| 32 | - */ |
|
| 33 | - protected function registerDependencies() |
|
| 34 | - { |
|
| 35 | - $this->dependency_map->registerDependencies( |
|
| 36 | - 'EventEspresso\core\domain\services\admin\events\default_settings\AdvancedEditorAdminFormSection', |
|
| 37 | - ['EE_Admin_Config' => EE_Dependency_Map::load_from_cache] |
|
| 38 | - ); |
|
| 39 | - } |
|
| 40 | - |
|
| 41 | - |
|
| 42 | - /** |
|
| 43 | - * implements logic required to run during request |
|
| 44 | - * |
|
| 45 | - * @return bool |
|
| 46 | - * @since $VID:$ |
|
| 47 | - */ |
|
| 48 | - protected function requestHandler() |
|
| 49 | - { |
|
| 50 | - return false; |
|
| 51 | - } |
|
| 18 | + /** |
|
| 19 | + * returns true if the current request matches this route |
|
| 20 | + * |
|
| 21 | + * @return bool |
|
| 22 | + * @since $VID:$ |
|
| 23 | + */ |
|
| 24 | + public function matchesCurrentRequest() |
|
| 25 | + { |
|
| 26 | + return parent::matchesCurrentRequest() && $this->request->getRequestParam('page') === 'espresso_events'; |
|
| 27 | + } |
|
| 28 | + |
|
| 29 | + |
|
| 30 | + /** |
|
| 31 | + * @since $VID:$ |
|
| 32 | + */ |
|
| 33 | + protected function registerDependencies() |
|
| 34 | + { |
|
| 35 | + $this->dependency_map->registerDependencies( |
|
| 36 | + 'EventEspresso\core\domain\services\admin\events\default_settings\AdvancedEditorAdminFormSection', |
|
| 37 | + ['EE_Admin_Config' => EE_Dependency_Map::load_from_cache] |
|
| 38 | + ); |
|
| 39 | + } |
|
| 40 | + |
|
| 41 | + |
|
| 42 | + /** |
|
| 43 | + * implements logic required to run during request |
|
| 44 | + * |
|
| 45 | + * @return bool |
|
| 46 | + * @since $VID:$ |
|
| 47 | + */ |
|
| 48 | + protected function requestHandler() |
|
| 49 | + { |
|
| 50 | + return false; |
|
| 51 | + } |
|
| 52 | 52 | } |
@@ -22,99 +22,99 @@ |
||
| 22 | 22 | class WordPressPluginsPage extends Route |
| 23 | 23 | { |
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * returns true if the current request matches this route |
|
| 27 | - * |
|
| 28 | - * @return bool |
|
| 29 | - * @since $VID:$ |
|
| 30 | - */ |
|
| 31 | - public function matchesCurrentRequest() |
|
| 32 | - { |
|
| 33 | - global $pagenow; |
|
| 34 | - return $this->request->isAdmin() && $pagenow && $pagenow === 'plugins.php'; |
|
| 35 | - } |
|
| 25 | + /** |
|
| 26 | + * returns true if the current request matches this route |
|
| 27 | + * |
|
| 28 | + * @return bool |
|
| 29 | + * @since $VID:$ |
|
| 30 | + */ |
|
| 31 | + public function matchesCurrentRequest() |
|
| 32 | + { |
|
| 33 | + global $pagenow; |
|
| 34 | + return $this->request->isAdmin() && $pagenow && $pagenow === 'plugins.php'; |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * @since $VID:$ |
|
| 40 | - */ |
|
| 41 | - protected function registerDependencies() |
|
| 42 | - { |
|
| 43 | - $this->dependency_map->registerDependencies( |
|
| 44 | - 'EventEspresso\core\domain\entities\routing\data_nodes\domains\WordPressPluginsPageData', |
|
| 45 | - [ |
|
| 46 | - 'EventEspresso\core\domain\services\admin\ExitModal' => EE_Dependency_Map::load_from_cache, |
|
| 47 | - 'EventEspresso\core\services\json\JsonDataNodeValidator' => EE_Dependency_Map::load_from_cache, |
|
| 48 | - ] |
|
| 49 | - ); |
|
| 50 | - $this->dependency_map->registerDependencies( |
|
| 51 | - 'EventEspresso\core\domain\services\admin\ExitModal', |
|
| 52 | - ['EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache] |
|
| 53 | - ); |
|
| 54 | - $this->dependency_map->registerDependencies( |
|
| 55 | - 'EventEspresso\core\domain\services\admin\PluginUpsells', |
|
| 56 | - ['EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache] |
|
| 57 | - ); |
|
| 38 | + /** |
|
| 39 | + * @since $VID:$ |
|
| 40 | + */ |
|
| 41 | + protected function registerDependencies() |
|
| 42 | + { |
|
| 43 | + $this->dependency_map->registerDependencies( |
|
| 44 | + 'EventEspresso\core\domain\entities\routing\data_nodes\domains\WordPressPluginsPageData', |
|
| 45 | + [ |
|
| 46 | + 'EventEspresso\core\domain\services\admin\ExitModal' => EE_Dependency_Map::load_from_cache, |
|
| 47 | + 'EventEspresso\core\services\json\JsonDataNodeValidator' => EE_Dependency_Map::load_from_cache, |
|
| 48 | + ] |
|
| 49 | + ); |
|
| 50 | + $this->dependency_map->registerDependencies( |
|
| 51 | + 'EventEspresso\core\domain\services\admin\ExitModal', |
|
| 52 | + ['EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache] |
|
| 53 | + ); |
|
| 54 | + $this->dependency_map->registerDependencies( |
|
| 55 | + 'EventEspresso\core\domain\services\admin\PluginUpsells', |
|
| 56 | + ['EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache] |
|
| 57 | + ); |
|
| 58 | 58 | |
| 59 | - /** @var WordPressPluginsPageData $data_node */ |
|
| 60 | - $data_node = $this->loader->getShared( |
|
| 61 | - 'EventEspresso\core\domain\entities\routing\data_nodes\domains\WordPressPluginsPageData' |
|
| 62 | - ); |
|
| 63 | - $this->setDataNode($data_node); |
|
| 64 | - /** @var PluginUpsells $plugin_upsells */ |
|
| 65 | - $plugin_upsells = $this->loader->getShared('EventEspresso\core\domain\services\admin\PluginUpsells'); |
|
| 66 | - $plugin_upsells->decafUpsells(); |
|
| 67 | - } |
|
| 59 | + /** @var WordPressPluginsPageData $data_node */ |
|
| 60 | + $data_node = $this->loader->getShared( |
|
| 61 | + 'EventEspresso\core\domain\entities\routing\data_nodes\domains\WordPressPluginsPageData' |
|
| 62 | + ); |
|
| 63 | + $this->setDataNode($data_node); |
|
| 64 | + /** @var PluginUpsells $plugin_upsells */ |
|
| 65 | + $plugin_upsells = $this->loader->getShared('EventEspresso\core\domain\services\admin\PluginUpsells'); |
|
| 66 | + $plugin_upsells->decafUpsells(); |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | 69 | |
| 70 | - /** |
|
| 71 | - * implements logic required to run during request |
|
| 72 | - * |
|
| 73 | - * @return bool |
|
| 74 | - * @since $VID:$ |
|
| 75 | - */ |
|
| 76 | - protected function requestHandler() |
|
| 77 | - { |
|
| 78 | - /** @var EspressoCoreAppAssetManager $asset_manager */ |
|
| 79 | - $this->asset_manager = $this->loader->getShared( |
|
| 80 | - 'EventEspresso\core\domain\services\assets\EspressoCoreAppAssetManager' |
|
| 81 | - ); |
|
| 82 | - add_action('admin_enqueue_scripts', [$this, 'addDependencies'], 3); |
|
| 83 | - add_action('admin_enqueue_scripts', [$this->asset_manager, 'enqueueBrowserAssets'], 100); |
|
| 84 | - wp_enqueue_style('wp-components'); |
|
| 85 | - return true; |
|
| 86 | - } |
|
| 70 | + /** |
|
| 71 | + * implements logic required to run during request |
|
| 72 | + * |
|
| 73 | + * @return bool |
|
| 74 | + * @since $VID:$ |
|
| 75 | + */ |
|
| 76 | + protected function requestHandler() |
|
| 77 | + { |
|
| 78 | + /** @var EspressoCoreAppAssetManager $asset_manager */ |
|
| 79 | + $this->asset_manager = $this->loader->getShared( |
|
| 80 | + 'EventEspresso\core\domain\services\assets\EspressoCoreAppAssetManager' |
|
| 81 | + ); |
|
| 82 | + add_action('admin_enqueue_scripts', [$this, 'addDependencies'], 3); |
|
| 83 | + add_action('admin_enqueue_scripts', [$this->asset_manager, 'enqueueBrowserAssets'], 100); |
|
| 84 | + wp_enqueue_style('wp-components'); |
|
| 85 | + return true; |
|
| 86 | + } |
|
| 87 | 87 | |
| 88 | 88 | |
| 89 | - /** |
|
| 90 | - * EspressoCoreAppAssetManager sets 'wp-i18n' as the only dependency for its scripts, |
|
| 91 | - * but the ExitSurvey uses additional WP core assets, so this method retrieves the |
|
| 92 | - * 'eventespresso-core-app' script and updates its dependencies accordingly |
|
| 93 | - * |
|
| 94 | - * @since $VID:$ |
|
| 95 | - */ |
|
| 96 | - public function addDependencies() |
|
| 97 | - { |
|
| 98 | - if (! $this->asset_manager instanceof EspressoCoreAppAssetManager) { |
|
| 99 | - throw new DomainException( |
|
| 100 | - esc_html__('Invalid or missing EspressoCoreAppAssetManager!') |
|
| 101 | - ); |
|
| 102 | - } |
|
| 103 | - $assets = $this->asset_manager->getAssets(); |
|
| 104 | - if (! $assets instanceof AssetCollection) { |
|
| 105 | - throw new DomainException( |
|
| 106 | - esc_html__('Invalid or missing AssetCollection!') |
|
| 107 | - ); |
|
| 108 | - } |
|
| 109 | - $appJs = $assets->getJavascriptAsset(EspressoCoreAppAssetManager::JS_HANDLE_EDITOR); |
|
| 110 | - if (! $appJs instanceof JavascriptAsset) { |
|
| 111 | - throw new DomainException( |
|
| 112 | - sprintf( |
|
| 113 | - esc_html__('Invalid or missing JavascriptAsset! Expected '), |
|
| 114 | - EspressoCoreAppAssetManager::JS_HANDLE_EDITOR |
|
| 115 | - ) |
|
| 116 | - ); |
|
| 117 | - } |
|
| 118 | - $appJs->addDependencies(['wp-components', 'wp-url']); |
|
| 119 | - } |
|
| 89 | + /** |
|
| 90 | + * EspressoCoreAppAssetManager sets 'wp-i18n' as the only dependency for its scripts, |
|
| 91 | + * but the ExitSurvey uses additional WP core assets, so this method retrieves the |
|
| 92 | + * 'eventespresso-core-app' script and updates its dependencies accordingly |
|
| 93 | + * |
|
| 94 | + * @since $VID:$ |
|
| 95 | + */ |
|
| 96 | + public function addDependencies() |
|
| 97 | + { |
|
| 98 | + if (! $this->asset_manager instanceof EspressoCoreAppAssetManager) { |
|
| 99 | + throw new DomainException( |
|
| 100 | + esc_html__('Invalid or missing EspressoCoreAppAssetManager!') |
|
| 101 | + ); |
|
| 102 | + } |
|
| 103 | + $assets = $this->asset_manager->getAssets(); |
|
| 104 | + if (! $assets instanceof AssetCollection) { |
|
| 105 | + throw new DomainException( |
|
| 106 | + esc_html__('Invalid or missing AssetCollection!') |
|
| 107 | + ); |
|
| 108 | + } |
|
| 109 | + $appJs = $assets->getJavascriptAsset(EspressoCoreAppAssetManager::JS_HANDLE_EDITOR); |
|
| 110 | + if (! $appJs instanceof JavascriptAsset) { |
|
| 111 | + throw new DomainException( |
|
| 112 | + sprintf( |
|
| 113 | + esc_html__('Invalid or missing JavascriptAsset! Expected '), |
|
| 114 | + EspressoCoreAppAssetManager::JS_HANDLE_EDITOR |
|
| 115 | + ) |
|
| 116 | + ); |
|
| 117 | + } |
|
| 118 | + $appJs->addDependencies(['wp-components', 'wp-url']); |
|
| 119 | + } |
|
| 120 | 120 | } |
@@ -95,19 +95,19 @@ |
||
| 95 | 95 | */ |
| 96 | 96 | public function addDependencies() |
| 97 | 97 | { |
| 98 | - if (! $this->asset_manager instanceof EspressoCoreAppAssetManager) { |
|
| 98 | + if ( ! $this->asset_manager instanceof EspressoCoreAppAssetManager) { |
|
| 99 | 99 | throw new DomainException( |
| 100 | 100 | esc_html__('Invalid or missing EspressoCoreAppAssetManager!') |
| 101 | 101 | ); |
| 102 | 102 | } |
| 103 | 103 | $assets = $this->asset_manager->getAssets(); |
| 104 | - if (! $assets instanceof AssetCollection) { |
|
| 104 | + if ( ! $assets instanceof AssetCollection) { |
|
| 105 | 105 | throw new DomainException( |
| 106 | 106 | esc_html__('Invalid or missing AssetCollection!') |
| 107 | 107 | ); |
| 108 | 108 | } |
| 109 | 109 | $appJs = $assets->getJavascriptAsset(EspressoCoreAppAssetManager::JS_HANDLE_EDITOR); |
| 110 | - if (! $appJs instanceof JavascriptAsset) { |
|
| 110 | + if ( ! $appJs instanceof JavascriptAsset) { |
|
| 111 | 111 | throw new DomainException( |
| 112 | 112 | sprintf( |
| 113 | 113 | esc_html__('Invalid or missing JavascriptAsset! Expected '), |