You are here

class AJAXactionLink in Flag Lists 4.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/ActionLink/AJAXactionLink.php \Drupal\flag_lists\Plugin\ActionLink\AJAXactionLink

Provides the AJAX link type.

This class is an extension of the Reload link type, but modified to provide AJAX links.

Plugin annotation


@ActionLinkType(
  id = "ajax_link",
  label = @Translation("AJAX link"),
  description = "An AJAX JavaScript request will be made without
  reloading the page."
)

Hierarchy

  • class \Drupal\flag_lists\Plugin\ActionLink\AJAXactionLink extends \Drupal\flag\Plugin\ActionLink\AJAXactionLink

Expanded class hierarchy of AJAXactionLink

File

src/Plugin/ActionLink/AJAXactionLink.php, line 22

Namespace

Drupal\flag_lists\Plugin\ActionLink
View source
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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AJAXactionLink::getAsFlagLink public function Currently a stub only.