public function ShareMessage::hasPlugin in Share Message 8
Checks whether the Share Message plugin of this Share Message exists.
Return value
bool TRUE if the Share Message plugin exists, FALSE otherwise.
Overrides ShareMessageInterface::hasPlugin
File
- src/
Entity/ ShareMessage.php, line 218
Class
- ShareMessage
- Entity class for the Share Message entity.
Namespace
Drupal\sharemessage\EntityCode
public function hasPlugin() {
if (!empty($this->plugin) && \Drupal::service('plugin.manager.sharemessage.share')
->hasDefinition($this->plugin)) {
return TRUE;
}
return FALSE;
}