public RestResourceConfig::__construct(array $values, $entity_type)
Constructs an Entity object.
Parameters
array $values: An array of values to set, keyed by property name. If the entity type has bundles, the bundle key has to be specified.
string $entity_type: The type of the entity to create.
Overrides ConfigEntityBase::__construct
File
- core/modules/rest/src/Entity/RestResourceConfig.php, line 73
Class
- RestResourceConfig
- Defines a RestResourceConfig configuration entity class.
Namespace
Drupal\rest\Entity
Code
1 2 3 4 5 6 7 8 9 | public function __construct( array $values , $entity_type ) { parent::__construct( $values , $entity_type ); // The config entity id looks like the plugin id but uses __ instead of : // because : is not valid for config entities. if (!isset( $this ->plugin_id) && isset( $this ->id)) { // Generate plugin_id on first entity creation. $this ->plugin_id = str_replace ( '.' , ':' , $this ->id); } } |
Please login to continue.