public function ResourceFieldEntity::setBundle in RESTful 7.2
Parameters
string $bundle:
Overrides ResourceFieldEntityInterface::setBundle
2 calls to ResourceFieldEntity::setBundle()
- ResourceFieldEntity::propertyWrapper in src/
Plugin/ resource/ Field/ ResourceFieldEntity.php - Get the wrapper for the property associated to the current field.
- ResourceFieldEntity::__construct in src/
Plugin/ resource/ Field/ ResourceFieldEntity.php - Constructor.
File
- src/
Plugin/ resource/ Field/ ResourceFieldEntity.php, line 813 - Contains \Drupal\restful\Plugin\resource\Field\ResourceFieldEntity
Class
- ResourceFieldEntity
- Class ResourceFieldEntity.
Namespace
Drupal\restful\Plugin\resource\FieldCode
public function setBundle($bundle) {
// Do not do pointless work if not needed.
if (!empty($this->bundle) && $this->bundle == $bundle) {
return;
}
$this->bundle = $bundle;
// If this is an options call, then introspect Entity API to add more data
// to the public field information.
if ($this
->getRequest()
->getMethod() == RequestInterface::METHOD_OPTIONS) {
$this
->populatePublicInfoField();
}
}