Constructor.
Description
See also
Parameters
- $prefix
-
(string) (Required) The instance prefix.
- $services
-
(array) (Required) Array of service instances.
- 'capabilities'
(Element_Setting_Capabilities) The capabilities instance. - 'db'
(DB) The database instance. - 'cache'
(Cache) The cache instance. - 'error_handler'
(Error_Handler) The error handler instance.
- 'capabilities'
- $translations
-
(awsmug\Torro_Forms\Translations\Translations_Element_Setting_Manager) (Required) Translations instance.
Source
File: src/db-objects/element-settings/element-setting-manager.php
public function __construct( $prefix, $services, $translations ) { $this->class_name = Element_Setting::class; $this->collection_class_name = Element_Setting_Collection::class; $this->query_class_name = Element_Setting_Query::class; $this->rest_controller_class_name = REST_Element_Settings_Controller::class; $this->singular_slug = 'element_setting'; $this->plural_slug = 'element_settings'; $this->table_name = $this->plural_slug; $this->cache_group = $this->plural_slug; $this->primary_property = 'id'; $this->public = true; parent::__construct( $prefix, $services, $translations ); if ( defined( 'WP_CLI' ) && WP_CLI ) { $command = new CLI_Element_Settings_Command( $this ); $command->add( str_replace( '_', ' ', $this->prefix ) . str_replace( '_', '-', $this->singular_slug ) ); } }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |