public function PhoneNumberSettings::calculateDependencies in SMS Framework 2.x
Same name and namespace in other branches
- 8 src/Entity/PhoneNumberSettings.php \Drupal\sms\Entity\PhoneNumberSettings::calculateDependencies()
- 2.1.x src/Entity/PhoneNumberSettings.php \Drupal\sms\Entity\PhoneNumberSettings::calculateDependencies()
Calculates dependencies and stores them in the dependency property.
Return value
$this
Overrides ConfigEntityBase::calculateDependencies
See also
\Drupal\Core\Config\Entity\ConfigDependencyManager
File
- src/
Entity/ PhoneNumberSettings.php, line 235
Class
- PhoneNumberSettings
- Defines storage for an SMS Gateway instance.
Namespace
Drupal\sms\EntityCode
public function calculateDependencies() {
parent::calculateDependencies();
foreach ($this->fields as $map => $field_name) {
$field_config = FieldConfig::loadByName($this
->getPhoneNumberEntityTypeId(), $this
->getPhoneNumberBundle(), $field_name);
if ($field_config) {
$this
->addDependency('config', $field_config
->getConfigDependencyName());
}
}
return $this->dependencies;
}