public function MassContactMessage::getCategories in Mass Contact 8
Get the message categories.
Return value
\Drupal\mass_contact\Entity\MassContactCategoryInterface[] The message categories.
Overrides MassContactMessageInterface::getCategories
File
- src/
Entity/ MassContactMessage.php, line 91
Class
- MassContactMessage
- The mass contact message entity for archiving messages.
Namespace
Drupal\mass_contact\EntityCode
public function getCategories() {
$categories = [];
foreach ($this
->get('categories') as $data) {
$categories[$data->target_id] = $data->entity;
}
return $categories;
}