protected DependencyTrait::addDependency($type, $name)
Adds a dependency.
Parameters
string $type: Type of dependency being added: 'module', 'theme', 'config', 'content'.
string $name: If $type is 'module' or 'theme', the name of the module or theme. If $type is 'config' or 'content', the result of EntityInterface::getConfigDependencyName().
Return value
$this
See also
\Drupal\Core\Entity\EntityInterface::getConfigDependencyName()
File
core/lib/Drupal/Core/Entity/DependencyTrait.php, line 31