public function StorageManager::setFieldLabel in Paragraph View Mode 8
Same name and namespace in other branches
- 2.x src/StorageManager.php \Drupal\paragraph_view_mode\StorageManager::setFieldLabel()
Sets field label.
Parameters
string $bundle: Paragraph entity bundle.
string $label: Label.
Throws
\Drupal\Core\Entity\EntityStorageException
Overrides StorageManagerInterface::setFieldLabel
File
- src/
StorageManager.php, line 131
Class
- StorageManager
- Provides fields and forms storage operations required by the module.
Namespace
Drupal\paragraph_view_modeCode
public function setFieldLabel(string $bundle, string $label) : void {
$field = $this
->getField($bundle);
if ($field) {
$field
->set('label', $label);
$field
->save();
}
}