public static function BUEditor::getBUEditorEditor in BUEditor 8
Same name and namespace in other branches
- 8.2 src/Plugin/Editor/BUEditor.php \Drupal\bueditor\Plugin\Editor\BUEditor::getBUEditorEditor()
Returns the selected BUEditor Editor entity for an account from editor settings.
2 calls to BUEditor::getBUEditorEditor()
- BUEditor::getJSSettings in src/
Plugin/ Editor/ BUEditor.php - Returns JavaScript settings to be attached.
- BUEditor::getLibraries in src/
Plugin/ Editor/ BUEditor.php - Returns libraries to be attached.
File
- src/
Plugin/ Editor/ BUEditor.php, line 115
Class
- BUEditor
- Defines BUEditor as an Editor plugin.
Namespace
Drupal\bueditor\Plugin\EditorCode
public static function getBUEditorEditor(Editor $editor, AccountInterface $account = NULL) {
if (!isset($account)) {
$account = \Drupal::currentUser();
}
$id = static::getBUEditorEditorId($editor, $account);
return $id ? \Drupal::entityTypeManager()
->getStorage('bueditor_editor')
->load($id) : FALSE;
}