public function DisplayHelper::getNewComponents in Lightning Core 8.3
Same name and namespace in other branches
- 8.5 src/DisplayHelper.php \Drupal\lightning_core\DisplayHelper::getNewComponents()
- 8 src/DisplayHelper.php \Drupal\lightning_core\DisplayHelper::getNewComponents()
- 8.2 src/DisplayHelper.php \Drupal\lightning_core\DisplayHelper::getNewComponents()
- 8.4 src/DisplayHelper.php \Drupal\lightning_core\DisplayHelper::getNewComponents()
Returns the components newly added to a display.
Parameters
\Drupal\Core\Entity\Display\EntityDisplayInterface $display: The display config entity.
Return value
array The newly added components.
1 call to DisplayHelper::getNewComponents()
- DisplayHelper::getNewFields in src/
DisplayHelper.php - Returns newly added field components, optionally filtered by a function.
File
- src/
DisplayHelper.php, line 78
Class
- DisplayHelper
- Helps query and configure various display settings.
Namespace
Drupal\lightning_coreCode
public function getNewComponents(EntityDisplayInterface $display) {
if (isset($display->original)) {
return array_diff_key($display
->getComponents(), $display->original
->getComponents());
}
else {
return [];
}
}