Verified Commit 68f39ef1 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3426958 by sorlov, godotislate, mstrelan, smustgrave: Convert ViewsJoin...

Issue #3426958 by sorlov, godotislate, mstrelan, smustgrave: Convert ViewsJoin plugin discovery to attributes

(cherry picked from commit ff659267)
parent e4791b43
Loading
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
<?php

namespace Drupal\views\Attribute;

use Drupal\Component\Plugin\Attribute\PluginID;

/**
 * Defines a Plugin attribute object for views join plugins.
 *
 * @see \Drupal\views\Plugin\views\join\JoinPluginBase
 *
 * @ingroup views_join_handlers
 */
#[\Attribute(\Attribute::TARGET_CLASS)]
class ViewsJoin extends PluginID {

}
+3 −2
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@

namespace Drupal\views\Plugin\views\join;

use Drupal\views\Attribute\ViewsJoin;

/**
 * Implementation for the "casted_int_field_join" join.
 *
@@ -11,9 +13,8 @@
 * are strict when comparing numbers and strings.
 *
 * @ingroup views_join_handlers
 *
 * @ViewsJoin("casted_int_field_join")
 */
#[ViewsJoin("casted_int_field_join")]
class CastedIntFieldJoin extends JoinPluginBase {

  /**
+2 −2
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
namespace Drupal\views\Plugin\views\join;

use Drupal\Core\Database\Query\SelectInterface;
use Drupal\views\Attribute\ViewsJoin;

/**
 * Implementation for the "field OR language" join.
@@ -58,9 +59,8 @@
 * @see views_field_default_views_data()
 *
 * @ingroup views_join_handlers
 *
 * @ViewsJoin("field_or_language_join")
 */
#[ViewsJoin("field_or_language_join")]
class FieldOrLanguageJoin extends JoinPluginBase {

  /**
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * handle table joins.
 *
 * Views join handlers extend \Drupal\views\Plugin\views\join\JoinPluginBase.
 * They must be annotated with \Drupal\views\Annotation\ViewsJoin annotation,
 * They must be attributed with \Drupal\views\Attribute\ViewsJoin attribute,
 * and they must be in namespace directory Plugin\views\join.
 *
 * Here are some examples of configuration for the join plugins.
+3 −2
Original line number Diff line number Diff line
@@ -2,13 +2,14 @@

namespace Drupal\views\Plugin\views\join;

use Drupal\views\Attribute\ViewsJoin;

/**
 * Default implementation of the join plugin.
 *
 * @ingroup views_join_handlers
 *
 * @ViewsJoin("standard")
 */
#[ViewsJoin("standard")]
class Standard extends JoinPluginBase {

}
Loading