Saves a comment.
@Action(
id = "comment_save_action",
label = @Translation("Save comment"),
type = "comment"
)
Expanded class hierarchy of SaveComment
class SaveComment extends ActionBase {
/**
* {@inheritdoc}
*/
public function execute($comment = NULL) {
$comment
->save();
Cache::invalidateTags(array(
'content' => TRUE,
));
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ActionBase:: |
public | function |
Executes the plugin for an array of objects. Overrides ActionInterface:: |
2 |
ContainerFactoryPluginBase:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
11 |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
public | function |
Returns the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function |
Returns the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Constructs a Drupal\Component\Plugin\PluginBase object. | 17 |
SaveComment:: |
public | function |
Executes the plugin. Overrides ExecutableInterface:: |