public function Connection::label in RedHen CRM 8
Gets the label of the entity.
Return value
string|null The label of the entity, or NULL if there is no label defined.
Overrides ContentEntityBase::label
File
- modules/
redhen_connection/ src/ Entity/ Connection.php, line 73
Class
- Connection
- Defines the Connection entity.
Namespace
Drupal\redhen_connection\EntityCode
public function label() {
$label_pattern = $this->type->entity
->get('connection_label_pattern');
return $this
->t($label_pattern, [
'@label1' => $this
->get('endpoint_1')->entity ? $this
->get('endpoint_1')->entity
->label() : "[entity 1 not found]",
'@label2' => $this
->get('endpoint_2')->entity ? $this
->get('endpoint_2')->entity
->label() : "[entity 2 not found]",
]);
}