AJAXactionLink.php in Flag Lists 4.0.x
Same filename and directory in other branches
Namespace
Drupal\flag_lists\Plugin\ActionLinkFile
src/Plugin/ActionLink/AJAXactionLink.phpView source
<?php
namespace Drupal\flag_lists\Plugin\ActionLink;
use Drupal\Core\Entity\EntityInterface;
use Drupal\flag\FlagInterface;
use Drupal\flag\Plugin\ActionLink\AJAXactionLink as FlagAJAXactionLink;
/**
* Provides the AJAX link type.
*
* This class is an extension of the Reload link type, but modified to
* provide AJAX links.
*
* @ActionLinkType(
* id = "ajax_link",
* label = @Translation("AJAX link"),
* description = "An AJAX JavaScript request will be made without
* reloading the page."
* )
*/
class AJAXactionLink extends FlagAJAXactionLink {
/**
* {@inheritdoc}
*
* Currently a stub only.
*/
public function getAsFlagLink(FlagInterface $flag, EntityInterface $entity) {
$build = parent::getAsFlagLink($flag, $entity);
// $build['#flagging_collection'] = 'text'.
return $build;
}
}
Classes
Name | Description |
---|---|
AJAXactionLink | Provides the AJAX link type. |