Issue #1734904 by tim.plunkett: Clean up plugins.
							parent
							
								
									e5a4ab8a6c
								
							
						
					
					
						commit
						9bc9242d19
					
				| 
						 | 
				
			
			@ -137,4 +137,5 @@ class Analyzer {
 | 
			
		|||
  static function formatMessage($message, $type = 'error') {
 | 
			
		||||
    return array('message' => $message, 'type' => $type);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,14 +59,20 @@ namespace Drupal\views;
 | 
			
		|||
 *   - - numeric: If true, the value will not be surrounded in quotes.
 | 
			
		||||
 *   - - extra type: How all the extras will be combined. Either AND or OR. Defaults to AND.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
class Join {
 | 
			
		||||
 | 
			
		||||
  var $table = NULL;
 | 
			
		||||
 | 
			
		||||
  var $left_table = NULL;
 | 
			
		||||
 | 
			
		||||
  var $left_field = NULL;
 | 
			
		||||
 | 
			
		||||
  var $field = NULL;
 | 
			
		||||
 | 
			
		||||
  var $extra = NULL;
 | 
			
		||||
 | 
			
		||||
  var $type = NULL;
 | 
			
		||||
 | 
			
		||||
  var $definition = array();
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
| 
						 | 
				
			
			@ -204,6 +210,7 @@ class Join {
 | 
			
		|||
 | 
			
		||||
    $select_query->addJoin($this->type, $right_table, $table['alias'], $condition, $arguments);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,6 +19,7 @@ use Drupal\views\Join;
 | 
			
		|||
 *   - left_query: The subquery to use in the left side of the join clause.
 | 
			
		||||
 */
 | 
			
		||||
class JoinSubquery extends Join {
 | 
			
		||||
 | 
			
		||||
  function construct($table = NULL, $left_table = NULL, $left_field = NULL, $field = NULL, $extra = array(), $type = 'LEFT') {
 | 
			
		||||
    parent::construct($table, $left_table, $left_field, $field, $extra, $type);
 | 
			
		||||
    $this->left_query = $this->definition['left_query'];
 | 
			
		||||
| 
						 | 
				
			
			@ -99,4 +100,5 @@ class JoinSubquery extends Join {
 | 
			
		|||
 | 
			
		||||
    $select_query->addJoin($this->type, $right_table, $table['alias'], $condition, $arguments);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,6 +13,7 @@ use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery;
 | 
			
		|||
 * Discovery interface which supports the hook_views_plugins mechanism.
 | 
			
		||||
 */
 | 
			
		||||
class ViewsDiscovery extends AnnotatedClassDiscovery {
 | 
			
		||||
 | 
			
		||||
  public function getDefinitions() {
 | 
			
		||||
    $definitions = parent::getDefinitions();
 | 
			
		||||
    foreach ($definitions as $definition) {
 | 
			
		||||
| 
						 | 
				
			
			@ -51,4 +52,5 @@ class ViewsDiscovery extends AnnotatedClassDiscovery {
 | 
			
		|||
 | 
			
		||||
    return $definitions;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,6 +13,7 @@ use Drupal\views\Plugin\Discovery\ViewsDiscovery;
 | 
			
		|||
use Drupal\Core\Plugin\Discovery\CacheDecorator;
 | 
			
		||||
 | 
			
		||||
class ViewsPluginManager extends PluginManagerBase {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * The handler type of this plugin manager, for example filter or field.
 | 
			
		||||
   *
 | 
			
		||||
| 
						 | 
				
			
			@ -26,4 +27,5 @@ class ViewsPluginManager extends PluginManagerBase {
 | 
			
		|||
    $this->discovery = new CacheDecorator(new ViewsDiscovery('views', $this->type), 'views:' . $this->type, 'cache');
 | 
			
		||||
    $this->factory = new DefaultFactory($this->discovery);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,8 @@ namespace Drupal\views\Plugin\views;
 | 
			
		|||
use Drupal\views\Plugin\views\Plugin;
 | 
			
		||||
use Drupal\views\View;
 | 
			
		||||
 | 
			
		||||
class Handler extends Plugin {
 | 
			
		||||
abstract class Handler extends Plugin {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Where the $query object will reside:
 | 
			
		||||
   *
 | 
			
		||||
| 
						 | 
				
			
			@ -603,4 +604,5 @@ class Handler extends Plugin {
 | 
			
		|||
   * a placeholder used when a handler can't be found.
 | 
			
		||||
   */
 | 
			
		||||
  function broken() { }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -451,4 +451,5 @@ abstract class Plugin extends PluginBase {
 | 
			
		|||
    }
 | 
			
		||||
    return check_plain($this->definition['title']);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,6 +21,7 @@ use Drupal\views\Plugin\views\Plugin;
 | 
			
		|||
 * The base plugin to handle access control.
 | 
			
		||||
 */
 | 
			
		||||
abstract class AccessPluginBase extends Plugin {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Initialize the plugin.
 | 
			
		||||
   *
 | 
			
		||||
| 
						 | 
				
			
			@ -93,6 +94,7 @@ abstract class AccessPluginBase extends Plugin {
 | 
			
		|||
    // default to no access control.
 | 
			
		||||
    return TRUE;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Access plugin that provides no access control at all.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_access_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "none",
 | 
			
		||||
 *   title = @Translation("None"),
 | 
			
		||||
| 
						 | 
				
			
			@ -25,7 +23,9 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class None extends AccessPluginBase {
 | 
			
		||||
 | 
			
		||||
  function summary_title() {
 | 
			
		||||
    return t('Unrestricted');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Access plugin that provides permission-based access control.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_access_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "perm",
 | 
			
		||||
 *   title = @Translation("Permission"),
 | 
			
		||||
| 
						 | 
				
			
			@ -26,6 +24,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Permission extends AccessPluginBase {
 | 
			
		||||
 | 
			
		||||
  function access($account) {
 | 
			
		||||
    return views_check_perm($this->options['perm'], $account);
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -74,4 +73,5 @@ class Permission extends AccessPluginBase {
 | 
			
		|||
      '#description' => t('Only users with the selected permission flag will be able to access this display. Note that users with "access all views" can see any view, regardless of other permissions.'),
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Access plugin that provides role-based access control.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_access_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "role",
 | 
			
		||||
 *   title = @Translation("Role"),
 | 
			
		||||
| 
						 | 
				
			
			@ -26,6 +24,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Role extends AccessPluginBase {
 | 
			
		||||
 | 
			
		||||
  function access($account) {
 | 
			
		||||
    return views_check_roles(array_filter($this->options['role']), $account);
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -78,4 +77,5 @@ class Role extends AccessPluginBase {
 | 
			
		|||
    // I hate checkboxes.
 | 
			
		||||
    $form_state['values']['access_options']['role'] = array_filter($form_state['values']['access_options']['role']);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,10 +22,7 @@ use Drupal\views\Plugin\views\Handler;
 | 
			
		|||
 *
 | 
			
		||||
 * @ingroup views_area_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 */
 | 
			
		||||
class AreaPluginBase extends Handler {
 | 
			
		||||
abstract class AreaPluginBase extends Handler {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Overrides Handler::init().
 | 
			
		||||
| 
						 | 
				
			
			@ -108,6 +105,7 @@ class AreaPluginBase extends Handler {
 | 
			
		|||
  function use_group_by() {
 | 
			
		||||
    return FALSE;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * A special handler to take the place of missing or broken handlers.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_area_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "broken"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Broken extends AreaPluginBase {
 | 
			
		||||
 | 
			
		||||
  function ui_name($short = FALSE) {
 | 
			
		||||
    return t('Broken/missing handler');
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -37,5 +36,8 @@ class Broken extends AreaPluginBase {
 | 
			
		|||
  /**
 | 
			
		||||
   * Determine if the handler is considered 'broken'
 | 
			
		||||
   */
 | 
			
		||||
  function broken() { return TRUE; }
 | 
			
		||||
  function broken() {
 | 
			
		||||
    return TRUE;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,9 +13,7 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Views area handler to display some configurable result summary.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_area_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "result"
 | 
			
		||||
 * )
 | 
			
		||||
| 
						 | 
				
			
			@ -103,4 +101,5 @@ class Result extends AreaPluginBase {
 | 
			
		|||
    }
 | 
			
		||||
    return $output;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,9 +13,7 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Views area text handler.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_area_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "text"
 | 
			
		||||
 * )
 | 
			
		||||
| 
						 | 
				
			
			@ -117,4 +115,5 @@ class Text extends AreaPluginBase {
 | 
			
		|||
      return check_markup($value, $format, '', FALSE);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,9 +13,7 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Views area text handler.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_area_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "text_custom"
 | 
			
		||||
 * )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,9 +13,7 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Views area handlers. Insert a view inside of an area.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_area_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "view"
 | 
			
		||||
 * )
 | 
			
		||||
| 
						 | 
				
			
			@ -90,4 +88,5 @@ class View extends AreaPluginBase {
 | 
			
		|||
    }
 | 
			
		||||
    return '';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,10 +40,7 @@ use Drupal\views\Plugin\views\Handler;
 | 
			
		|||
 *
 | 
			
		||||
 * @ingroup views_argument_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 */
 | 
			
		||||
class ArgumentPluginBase extends Handler {
 | 
			
		||||
abstract class ArgumentPluginBase extends Handler {
 | 
			
		||||
 | 
			
		||||
  var $validator = NULL;
 | 
			
		||||
  var $argument = NULL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * A special handler to take the place of missing or broken handlers.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "broken"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Broken extends ArgumentPluginBase {
 | 
			
		||||
 | 
			
		||||
  function ui_name($short = FALSE) {
 | 
			
		||||
    return t('Broken/missing handler');
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -37,4 +36,5 @@ class Broken extends ArgumentPluginBase {
 | 
			
		|||
   * Determine if the handler is considered 'broken'
 | 
			
		||||
   */
 | 
			
		||||
  function broken() { return TRUE; }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,9 +26,7 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * @see Drupal\views\ManyTonOneHelper
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "date"
 | 
			
		||||
 * )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,15 +18,15 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * - formula: The formula to use for this handler.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "formula"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Formula extends ArgumentPluginBase {
 | 
			
		||||
 | 
			
		||||
  var $formula = NULL;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Constructor
 | 
			
		||||
   */
 | 
			
		||||
| 
						 | 
				
			
			@ -70,4 +70,5 @@ class Formula extends ArgumentPluginBase {
 | 
			
		|||
    );
 | 
			
		||||
    $this->query->add_where(0, $formula, $placeholders, 'formula');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Simple handler for arguments using group by.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "groupby_numeric"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class GroupByNumeric extends ArgumentPluginBase  {
 | 
			
		||||
class GroupByNumeric extends ArgumentPluginBase {
 | 
			
		||||
 | 
			
		||||
  function query($group_by = FALSE) {
 | 
			
		||||
    $this->ensure_my_table();
 | 
			
		||||
    $field = $this->get_field();
 | 
			
		||||
| 
						 | 
				
			
			@ -36,4 +35,5 @@ class GroupByNumeric extends ArgumentPluginBase  {
 | 
			
		|||
  function get_sort_name() {
 | 
			
		||||
    return t('Numerical', array(), array('context' => 'Sort order'));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,14 +22,13 @@ use Drupal\views\ManyToOneHelper;
 | 
			
		|||
 *   a default argument can be provided or a summary can be shown.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "many_to_one"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class ManyToOne extends ArgumentPluginBase {
 | 
			
		||||
 | 
			
		||||
  function init(&$view, &$options) {
 | 
			
		||||
    parent::init($view, $options);
 | 
			
		||||
    $this->helper = new ManyToOneHelper($this);
 | 
			
		||||
| 
						 | 
				
			
			@ -193,4 +192,5 @@ class ManyToOne extends ArgumentPluginBase {
 | 
			
		|||
  function title_query() {
 | 
			
		||||
    return $this->value;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Argument handler that ignores the argument.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "null"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Null extends ArgumentPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
    $options['must_not_be'] = array('default' => FALSE, 'bool' => TRUE);
 | 
			
		||||
| 
						 | 
				
			
			@ -74,4 +73,5 @@ class Null extends ArgumentPluginBase {
 | 
			
		|||
   * from being changed in any way.
 | 
			
		||||
   */
 | 
			
		||||
  function query($group_by = FALSE) {}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,14 +14,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * break_phrase.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "numeric"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Numeric extends ArgumentPluginBase {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * The operator used for the query: or|and.
 | 
			
		||||
   * @var string
 | 
			
		||||
| 
						 | 
				
			
			@ -123,4 +122,5 @@ class Numeric extends ArgumentPluginBase {
 | 
			
		|||
  function get_sort_name() {
 | 
			
		||||
    return t('Numerical', array(), array('context' => 'Sort order'));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,14 +15,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * limits.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "string"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class String extends ArgumentPluginBase {
 | 
			
		||||
 | 
			
		||||
  function init(&$view, &$options) {
 | 
			
		||||
    parent::init($view, $options);
 | 
			
		||||
    if (!empty($this->definition['many to one'])) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,6 +21,7 @@ use Drupal\views\Plugin\views\Plugin;
 | 
			
		|||
 * The fixed argument default handler; also used as the base.
 | 
			
		||||
 */
 | 
			
		||||
abstract class ArgumentDefaultPluginBase extends Plugin {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Return the default argument.
 | 
			
		||||
   *
 | 
			
		||||
| 
						 | 
				
			
			@ -91,6 +92,7 @@ abstract class ArgumentDefaultPluginBase extends Plugin {
 | 
			
		|||
   * views_plugin_argument_default_fixed for a good example of this method.
 | 
			
		||||
   */
 | 
			
		||||
  function convert_options(&$options) { }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * The fixed argument default handler.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_default_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "fixed",
 | 
			
		||||
 *   title = @Translation("Fixed")
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Fixed extends ArgumentDefaultPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
    $options['argument'] = array('default' => '');
 | 
			
		||||
| 
						 | 
				
			
			@ -51,8 +50,5 @@ class Fixed extends ArgumentDefaultPluginBase {
 | 
			
		|||
      $options['argument'] = $this->argument->options['default_argument_fixed'];
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @}
 | 
			
		||||
 */
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Default argument plugin to provide a PHP code block.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_default_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "php",
 | 
			
		||||
 *   title = @Translation("PHP Code")
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Php extends ArgumentDefaultPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
    $options['code'] = array('default' => '');
 | 
			
		||||
| 
						 | 
				
			
			@ -66,4 +65,5 @@ class Php extends ArgumentDefaultPluginBase {
 | 
			
		|||
    ob_end_clean();
 | 
			
		||||
    return $result;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Default argument plugin to use the raw value from the URL.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_default_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "raw",
 | 
			
		||||
 *   title = @Translation("Raw value from URL")
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Raw extends ArgumentDefaultPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
    $options['index'] = array('default' => '');
 | 
			
		||||
| 
						 | 
				
			
			@ -59,4 +58,5 @@ class Raw extends ArgumentDefaultPluginBase {
 | 
			
		|||
      return $arg;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -96,6 +96,7 @@ abstract class ArgumentValidatorPluginBase extends Plugin {
 | 
			
		|||
   * the old value again, for example the summary.
 | 
			
		||||
   */
 | 
			
		||||
  function process_summary_arguments(&$args) { }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,16 +14,16 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Validate whether an argument is numeric or not.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_validate_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "numeric",
 | 
			
		||||
 *   title = @Translation("Numeric")
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Numeric extends ArgumentValidatorPluginBase {
 | 
			
		||||
 | 
			
		||||
  function validate_argument($argument) {
 | 
			
		||||
    return is_numeric($argument);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Provide PHP code to validate whether or not an argument is ok.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_argument_validate_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "php",
 | 
			
		||||
 *   title = @Translation("PHP Code")
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Php extends ArgumentValidatorPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
    $options['code'] = array('default' => '');
 | 
			
		||||
| 
						 | 
				
			
			@ -66,4 +65,5 @@ class Php extends ArgumentValidatorPluginBase {
 | 
			
		|||
    ob_end_clean();
 | 
			
		||||
    return $result;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,6 +22,7 @@ use Drupal\Core\Database\Query\Select;
 | 
			
		|||
 * The base plugin to handle caching.
 | 
			
		||||
 */
 | 
			
		||||
abstract class CachePluginBase extends Plugin {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Contains all data that should be written/read from cache.
 | 
			
		||||
   */
 | 
			
		||||
| 
						 | 
				
			
			@ -320,6 +321,7 @@ abstract class CachePluginBase extends Plugin {
 | 
			
		|||
 | 
			
		||||
    return $this->_output_key;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Caching plugin that provides no caching at all.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_cache_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "none",
 | 
			
		||||
 *   title = @Translation("None"),
 | 
			
		||||
| 
						 | 
				
			
			@ -25,6 +23,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class None extends CachePluginBase {
 | 
			
		||||
 | 
			
		||||
  function cache_start() { /* do nothing */ }
 | 
			
		||||
 | 
			
		||||
  function summary_title() {
 | 
			
		||||
| 
						 | 
				
			
			@ -36,4 +35,5 @@ class None extends CachePluginBase {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  function cache_set($type) { }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Simple caching of query results for Views displays.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_cache_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "time",
 | 
			
		||||
 *   title = @Translation("Time-based"),
 | 
			
		||||
| 
						 | 
				
			
			@ -26,6 +24,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Time extends CachePluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
    $options['results_lifespan'] = array('default' => 3600);
 | 
			
		||||
| 
						 | 
				
			
			@ -124,4 +123,5 @@ class Time extends CachePluginBase {
 | 
			
		|||
      return CACHE_PERMANENT;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,9 +18,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * the same view. They can share some information.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_display_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "attachment",
 | 
			
		||||
 *   title = @Translation("Attachment"),
 | 
			
		||||
| 
						 | 
				
			
			@ -35,6 +33,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Attachment extends DisplayPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -299,4 +298,5 @@ class Attachment extends DisplayPluginBase {
 | 
			
		|||
  function render_pager() {
 | 
			
		||||
    return !empty($this->use_pager) && $this->get_option('render_pager');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * The plugin that handles a block.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_display_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "block",
 | 
			
		||||
 *   title = @Translation("Block"),
 | 
			
		||||
| 
						 | 
				
			
			@ -33,6 +31,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Block extends DisplayPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -262,4 +261,5 @@ class Block extends DisplayPluginBase {
 | 
			
		|||
        ->execute();
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * A plugin to handle defaults on a view.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_display_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "default",
 | 
			
		||||
 *   title = @Translation("Master"),
 | 
			
		||||
| 
						 | 
				
			
			@ -32,6 +30,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class DefaultDisplay extends DisplayPluginBase {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Determine if this display is the 'default' display which contains
 | 
			
		||||
   * fallback settings
 | 
			
		||||
| 
						 | 
				
			
			@ -75,4 +74,5 @@ class DefaultDisplay extends DisplayPluginBase {
 | 
			
		|||
  function execute() {
 | 
			
		||||
    return $this->view->render($this->display->id);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,6 +29,7 @@ use Drupal\views\Plugin\Type\ViewsPluginManager;
 | 
			
		|||
 * basic mechanisms for different output methods.
 | 
			
		||||
 */
 | 
			
		||||
abstract class DisplayPluginBase extends Plugin {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * The top object of a view.
 | 
			
		||||
   *
 | 
			
		||||
| 
						 | 
				
			
			@ -3092,8 +3093,8 @@ abstract class DisplayPluginBase extends Plugin {
 | 
			
		|||
      'items per page description' => t('The number of items to display. Enter 0 for no limit.')
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,9 +17,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 *
 | 
			
		||||
 * @todo: Wait until annotations/plugins support access mehtods.
 | 
			
		||||
 * no ui => !config('views.settings')->get('ui.show.display_embed'),
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "embed",
 | 
			
		||||
 *   title = @Translation("Embed"),
 | 
			
		||||
| 
						 | 
				
			
			@ -33,5 +31,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Embed extends DisplayPluginBase {
 | 
			
		||||
 | 
			
		||||
  // This display plugin does nothing apart from exist.
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,9 +17,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * For the most part, feeds are page displays but with some subtle differences.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_display_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "feed",
 | 
			
		||||
 *   title = @Translation("Feed"),
 | 
			
		||||
| 
						 | 
				
			
			@ -33,6 +31,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Feed extends Page {
 | 
			
		||||
 | 
			
		||||
  function init(&$view, &$display, $options = NULL) {
 | 
			
		||||
    parent::init($view, $display, $options);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -247,4 +246,5 @@ class Feed extends Page {
 | 
			
		|||
  function uses_link_display() {
 | 
			
		||||
    return TRUE;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * The plugin that handles a full page.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_display_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "page",
 | 
			
		||||
 *   title = @Translation("Page"),
 | 
			
		||||
| 
						 | 
				
			
			@ -33,6 +31,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Page extends DisplayPluginBase {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * The page display has a path.
 | 
			
		||||
   */
 | 
			
		||||
| 
						 | 
				
			
			@ -650,4 +649,5 @@ class Page extends DisplayPluginBase {
 | 
			
		|||
      'items per page description' => t('The number of items to display per page. Enter 0 for no limit.')
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,8 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
use Drupal\Core\Annotation\Translation;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @todo
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "default",
 | 
			
		||||
 *   title = @Translation("Empty display extender"),
 | 
			
		||||
| 
						 | 
				
			
			@ -19,4 +21,5 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class DefaultDisplayExtender extends DisplayExtenderPluginBase {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,16 +15,13 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 *
 | 
			
		||||
 * @ingroup views_display_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 */
 | 
			
		||||
abstract class DisplayExtenderPluginBase extends Plugin {
 | 
			
		||||
 | 
			
		||||
  function init(&$view, &$display) {
 | 
			
		||||
    $this->view = $view;
 | 
			
		||||
    $this->display = $display;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Provide a form to edit options for this plugin.
 | 
			
		||||
   */
 | 
			
		||||
| 
						 | 
				
			
			@ -67,4 +64,5 @@ abstract class DisplayExtenderPluginBase extends Plugin {
 | 
			
		|||
   * and what items each section contains.
 | 
			
		||||
   */
 | 
			
		||||
  function defaultable_sections(&$sections, $section = NULL) { }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Exposed form plugin that provides a basic exposed form.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_exposed_form_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "basic",
 | 
			
		||||
 *   title = @Translation("Basic"),
 | 
			
		||||
| 
						 | 
				
			
			@ -25,4 +23,6 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 *   help_topic = "exposed-form-basic"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Basic extends ExposedFormPluginBase { }
 | 
			
		||||
class Basic extends ExposedFormPluginBase {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -323,6 +323,7 @@ abstract class ExposedFormPluginBase extends Plugin {
 | 
			
		|||
 | 
			
		||||
    $form_state['values'] = array();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Exposed form plugin that provides an exposed form with required input.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_exposed_form_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "input_required",
 | 
			
		||||
 *   title = @Translation("Input required"),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,14 +23,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 *      @endcode
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "boolean"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Boolean extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
    $options['type'] = array('default' => 'yes-no');
 | 
			
		||||
| 
						 | 
				
			
			@ -86,4 +85,5 @@ class Boolean extends FieldPluginBase {
 | 
			
		|||
      return $value ? $this->formats['yes-no'][0] : $this->formats['yes-no'][1];
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * A special handler to take the place of missing or broken handlers.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "broken"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Broken extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  function ui_name($short = FALSE) {
 | 
			
		||||
    return t('Broken/missing handler');
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -37,4 +36,5 @@ class Broken extends FieldPluginBase {
 | 
			
		|||
   * Determine if the handler is considered 'broken'
 | 
			
		||||
   */
 | 
			
		||||
  function broken() { return TRUE; }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Provides a handler that adds contextual links.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "contextual_links"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class ContextualLinks extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -113,4 +112,5 @@ class ContextualLinks extends FieldPluginBase {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  function query() { }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Field handler to show a counter of the current row.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "counter"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Counter extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
    $options['counter_start'] = array('default' => 1);
 | 
			
		||||
| 
						 | 
				
			
			@ -57,4 +56,5 @@ class Counter extends FieldPluginBase {
 | 
			
		|||
 | 
			
		||||
    return $count;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * A handler to provide a field that is completely custom by the administrator.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "custom"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Custom extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  function query() {
 | 
			
		||||
    // do nothing -- to override the parent query.
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -48,4 +47,5 @@ class Custom extends FieldPluginBase {
 | 
			
		|||
    // Return the text, so the code never thinks the value is empty.
 | 
			
		||||
    return $this->options['alter']['text'];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * A handler to provide proper displays for dates.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "date"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Date extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -117,4 +116,5 @@ class Date extends FieldPluginBase {
 | 
			
		|||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,10 +19,8 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * @code views_entity_{ENTITY_TYPE} @endcode.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "entity"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			@ -111,4 +109,5 @@ class Entity extends FieldPluginBase {
 | 
			
		|||
    }
 | 
			
		||||
    return FALSE;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,13 +47,7 @@ define('VIEWS_HANDLER_RENDER_TEXT_PHASE_EMPTY', 2);
 | 
			
		|||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *   id = "standard"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class FieldPluginBase extends Handler {
 | 
			
		||||
abstract class FieldPluginBase extends Handler {
 | 
			
		||||
 | 
			
		||||
  var $field_alias = 'unknown';
 | 
			
		||||
  var $aliases = array();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,14 +11,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Render a numeric value as a size.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "file_size"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class FileSize extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -54,4 +53,5 @@ class FileSize extends FieldPluginBase {
 | 
			
		|||
      return '';
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,14 +16,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Definition items:
 | 
			
		||||
 * - options callback: The function to call in order to generate the value options. If omitted, the options 'Yes' and 'No' will be used.
 | 
			
		||||
 * - options arguments: An array of arguments to pass to the options callback.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "machine_name"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class MachineName extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * @var array Stores the available options.
 | 
			
		||||
   */
 | 
			
		||||
| 
						 | 
				
			
			@ -80,4 +79,5 @@ class MachineName extends FieldPluginBase {
 | 
			
		|||
 | 
			
		||||
    return $result;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,14 +19,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 *           which goes with the 'body' field.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "markup"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Markup extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Constructor; calls to base object constructor.
 | 
			
		||||
   */
 | 
			
		||||
| 
						 | 
				
			
			@ -66,4 +65,5 @@ class Markup extends FieldPluginBase {
 | 
			
		|||
 | 
			
		||||
    return 'div';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,14 +18,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 *   will be assumed to be integer.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "math"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Math extends Numeric {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
    $options['expression'] = array('default' => '');
 | 
			
		||||
| 
						 | 
				
			
			@ -91,4 +90,5 @@ class Math extends Numeric {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  function query() { }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,14 +17,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 *          will be assumed to be integer.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "numeric"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Numeric extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -156,4 +155,5 @@ class Numeric extends FieldPluginBase {
 | 
			
		|||
      . $this->sanitize_value($value)
 | 
			
		||||
      . $this->sanitize_value($this->options['suffix'], 'xss');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,14 +18,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Items to render should be in a list in $this->items
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "prerender_list"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class PrerenderList extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Stores all items which are used to render the items.
 | 
			
		||||
   * It should be keyed first by the id of the base table, for example nid.
 | 
			
		||||
| 
						 | 
				
			
			@ -169,4 +168,5 @@ class PrerenderList extends FieldPluginBase {
 | 
			
		|||
    // this method to determine if it needs to render items as a list.
 | 
			
		||||
    return method_exists($this, 'render_item');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,10 +13,8 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Field handler to show data of serialized fields.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "serialized"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			@ -76,4 +74,5 @@ class Serialized extends FieldPluginBase {
 | 
			
		|||
 | 
			
		||||
    return $value;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
<?php
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Definition of Drupal\views\Plugin\views\field\Standard.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
namespace Drupal\views\Plugin\views\field;
 | 
			
		||||
 | 
			
		||||
use Drupal\Core\Annotation\Plugin;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Default implementation of the base field plugin.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "standard"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Standard extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * A handler to provide proper displays for time intervals.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "time_interval"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class TimeInterval extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -44,4 +43,5 @@ class TimeInterval extends FieldPluginBase {
 | 
			
		|||
    $value = $values->{$this->field_alias};
 | 
			
		||||
    return format_interval($value, isset($this->options['granularity']) ? $this->options['granularity'] : 2);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Field handler to provide simple renderer that turns a URL into a clickable link.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "url"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Url extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -50,4 +49,5 @@ class Url extends FieldPluginBase {
 | 
			
		|||
      return $this->sanitize_value($value, 'url');
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,16 +12,16 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * A handler to run a field through simple XSS filtering.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "xss"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Xss extends FieldPluginBase {
 | 
			
		||||
 | 
			
		||||
  function render($values) {
 | 
			
		||||
    $value = $this->get_value($values);
 | 
			
		||||
    return $this->sanitize_value($value, 'xss');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,10 +24,8 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 *   This might be helpful for performance reasons.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "boolean"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,14 +19,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * - label: (REQUIRED) The label for the checkbox.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "boolean_string"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class BooleanOperatorString extends BooleanOperator {
 | 
			
		||||
 | 
			
		||||
  function query() {
 | 
			
		||||
    $this->ensure_my_table();
 | 
			
		||||
    $where = "$this->table_alias.$this->real_field ";
 | 
			
		||||
| 
						 | 
				
			
			@ -42,4 +41,5 @@ class BooleanOperatorString extends BooleanOperator {
 | 
			
		|||
    }
 | 
			
		||||
    $this->query->add_where($this->options['group'], $where);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * A special handler to take the place of missing or broken handlers.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "broken"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Broken extends FilterPluginBase {
 | 
			
		||||
 | 
			
		||||
  function ui_name($short = FALSE) {
 | 
			
		||||
    return t('Broken/missing handler');
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -37,4 +36,5 @@ class Broken extends FilterPluginBase {
 | 
			
		|||
   * Determine if the handler is considered 'broken'
 | 
			
		||||
   */
 | 
			
		||||
  function broken() { return TRUE; }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Filter handler which allows to search on multiple fields.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_field_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "combine"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Combine extends String {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * @var views_plugin_query_default
 | 
			
		||||
   */
 | 
			
		||||
| 
						 | 
				
			
			@ -144,4 +143,5 @@ class Combine extends String {
 | 
			
		|||
 | 
			
		||||
    $this->query->add_where_expression($this->options['group'], "$field $operator");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Filter to handle dates stored as a timestamp.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "date"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Date extends Numeric {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -162,4 +161,5 @@ class Date extends Numeric {
 | 
			
		|||
    // It is necessary to do it this way because $value is a formula when using an offset.
 | 
			
		||||
    $this->query->add_where_expression($this->options['group'], "$field $this->operator $value");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Simple filter to handle equal to / not equal to filters
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "equality"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Equality extends FilterPluginBase {
 | 
			
		||||
 | 
			
		||||
  // exposed filter options
 | 
			
		||||
  var $always_multiple = TRUE;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -52,4 +51,5 @@ class Equality extends FilterPluginBase {
 | 
			
		|||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,13 +36,8 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 */
 | 
			
		||||
abstract class FilterPluginBase extends Handler {
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "standard"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class FilterPluginBase extends Handler {
 | 
			
		||||
  /**
 | 
			
		||||
   * Contains the actual value of the field,either configured in the views ui
 | 
			
		||||
   * or entered in the exposed filters.
 | 
			
		||||
| 
						 | 
				
			
			@ -722,6 +717,7 @@ class FilterPluginBase extends Handler {
 | 
			
		|||
   function can_group() {
 | 
			
		||||
     return TRUE;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Simple filter to handle greater than/less than filters
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "groupby_numeric"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class GroupByNumeric extends Numeric {
 | 
			
		||||
 | 
			
		||||
  function query() {
 | 
			
		||||
    $this->ensure_my_table();
 | 
			
		||||
    $field = $this->get_field();
 | 
			
		||||
| 
						 | 
				
			
			@ -63,4 +62,5 @@ class GroupByNumeric extends Numeric {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  function can_group() { return FALSE; }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,14 +17,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * - options arguments: An array of arguments to pass to the options callback.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "in_operator"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class InOperator extends FilterPluginBase {
 | 
			
		||||
 | 
			
		||||
  var $value_form_type = 'checkboxes';
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
| 
						 | 
				
			
			@ -435,4 +434,5 @@ class InOperator extends FilterPluginBase {
 | 
			
		|||
    }
 | 
			
		||||
    return $errors;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,14 +19,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * to provide something that isn't just a select list.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "many_to_one"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class ManyToOne extends InOperator {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * @var Drupal\views\ManyToOneHelper
 | 
			
		||||
   *
 | 
			
		||||
| 
						 | 
				
			
			@ -133,4 +132,5 @@ class ManyToOne extends InOperator {
 | 
			
		|||
    }
 | 
			
		||||
    $this->helper->add_filter();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,15 +14,15 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * Simple filter to handle greater than/less than filters
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "numeric"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Numeric extends FilterPluginBase {
 | 
			
		||||
 | 
			
		||||
  var $always_multiple = TRUE;
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -339,4 +339,5 @@ class Numeric extends FilterPluginBase {
 | 
			
		|||
 | 
			
		||||
    return $rc;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
<?php
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Definition of Drupal\views\Plugin\views\filter\Standard.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
namespace Drupal\views\Plugin\views\filter;
 | 
			
		||||
 | 
			
		||||
use Drupal\Core\Annotation\Plugin;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Default implementation of the base filter plugin.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "standard"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Standard extends FilterPluginBase {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -15,9 +15,7 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * including equality, like, not like, etc.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_filter_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "string"
 | 
			
		||||
 * )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Localization plugin to pass translatable strings through t().
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_localization_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "core",
 | 
			
		||||
 *   title = @Translation("Core"),
 | 
			
		||||
| 
						 | 
				
			
			@ -122,4 +120,5 @@ class Core extends LocalizationPluginBase {
 | 
			
		|||
    }
 | 
			
		||||
    return $output;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,8 +21,10 @@ use Drupal\views\Plugin\views\Plugin;
 | 
			
		|||
 * The base plugin to handle localization of Views strings.
 | 
			
		||||
 */
 | 
			
		||||
abstract class LocalizationPluginBase extends Plugin {
 | 
			
		||||
 | 
			
		||||
  // Store for exported strings
 | 
			
		||||
  var $export_strings = array();
 | 
			
		||||
 | 
			
		||||
  var $translate = TRUE;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
| 
						 | 
				
			
			@ -168,6 +170,7 @@ abstract class LocalizationPluginBase extends Plugin {
 | 
			
		|||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Localization plugin for no localization.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_localization_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "none",
 | 
			
		||||
 *   title = @Translation("None"),
 | 
			
		||||
| 
						 | 
				
			
			@ -25,6 +23,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class None extends LocalizationPluginBase {
 | 
			
		||||
 | 
			
		||||
  var $translate = FALSE;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
| 
						 | 
				
			
			@ -47,4 +46,5 @@ class None extends LocalizationPluginBase {
 | 
			
		|||
  function delete($source) {
 | 
			
		||||
    return FALSE;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * The plugin to handle full pager.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_pager_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "full",
 | 
			
		||||
 *   title = @Translation("Paged output, full pager"),
 | 
			
		||||
| 
						 | 
				
			
			@ -27,6 +25,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Full extends PagerPluginBase {
 | 
			
		||||
 | 
			
		||||
  function summary_title() {
 | 
			
		||||
    if (!empty($this->options['offset'])) {
 | 
			
		||||
      return format_plural($this->options['items_per_page'], '@count item, skip @skip', 'Paged, @count items, skip @skip', array('@count' => $this->options['items_per_page'], '@skip' => $this->options['offset']));
 | 
			
		||||
| 
						 | 
				
			
			@ -443,4 +442,5 @@ class Full extends PagerPluginBase {
 | 
			
		|||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * The plugin to handle full pager.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_pager_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "mini",
 | 
			
		||||
 *   title = @Translation("Paged output, mini pager"),
 | 
			
		||||
| 
						 | 
				
			
			@ -27,6 +25,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Mini extends PagerPluginBase {
 | 
			
		||||
 | 
			
		||||
  function summary_title() {
 | 
			
		||||
    if (!empty($this->options['offset'])) {
 | 
			
		||||
      return format_plural($this->options['items_per_page'], 'Mini pager, @count item, skip @skip', 'Mini pager, @count items, skip @skip', array('@count' => $this->options['items_per_page'], '@skip' => $this->options['offset']));
 | 
			
		||||
| 
						 | 
				
			
			@ -39,4 +38,5 @@ class Mini extends PagerPluginBase {
 | 
			
		|||
    return theme($pager_theme, array(
 | 
			
		||||
      'parameters' => $input, 'element' => $this->options['id']));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Plugin for views without pagers.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_pager_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "none",
 | 
			
		||||
 *   title = @Translation("Display all items"),
 | 
			
		||||
| 
						 | 
				
			
			@ -88,4 +86,5 @@ class None extends PagerPluginBase {
 | 
			
		|||
      $this->view->query->set_offset($this->options['offset']);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,7 +21,9 @@ use Drupal\views\Plugin\views\Plugin;
 | 
			
		|||
 * The base plugin to handle pager.
 | 
			
		||||
 */
 | 
			
		||||
abstract class PagerPluginBase extends Plugin {
 | 
			
		||||
 | 
			
		||||
  var $current_page = NULL;
 | 
			
		||||
 | 
			
		||||
  var $total_items = 0;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
| 
						 | 
				
			
			@ -233,6 +235,7 @@ abstract class PagerPluginBase extends Plugin {
 | 
			
		|||
  function offset_exposed() {
 | 
			
		||||
    return FALSE;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * Plugin for views without pagers.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_pager_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "some",
 | 
			
		||||
 *   title = @Translation("Display a specified number of items"),
 | 
			
		||||
| 
						 | 
				
			
			@ -27,6 +25,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Some extends PagerPluginBase {
 | 
			
		||||
 | 
			
		||||
  function summary_title() {
 | 
			
		||||
    if (!empty($this->options['offset'])) {
 | 
			
		||||
      return format_plural($this->options['items_per_page'], '@count item, skip @skip', '@count items, skip @skip', array('@count' => $this->options['items_per_page'], '@skip' => $this->options['offset']));
 | 
			
		||||
| 
						 | 
				
			
			@ -75,4 +74,5 @@ class Some extends PagerPluginBase {
 | 
			
		|||
    $this->view->query->set_limit($this->options['items_per_page']);
 | 
			
		||||
    $this->view->query->set_offset($this->options['offset']);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,6 +8,9 @@ namespace Drupal\views\Plugin\views\query;
 | 
			
		|||
 | 
			
		||||
use Drupal\views\Plugin\views\PluginInterface;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @todo.
 | 
			
		||||
 */
 | 
			
		||||
interface QueryInterface extends PluginInterface {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,11 @@ namespace Drupal\views\Plugin\views\query;
 | 
			
		|||
 | 
			
		||||
use Drupal\views\Plugin\views\Plugin;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @todo.
 | 
			
		||||
 */
 | 
			
		||||
abstract class QueryPluginBase extends Plugin implements QueryInterface {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * A pager plugin that should be provided by the display.
 | 
			
		||||
   *
 | 
			
		||||
| 
						 | 
				
			
			@ -170,4 +174,5 @@ abstract class QueryPluginBase extends Plugin implements QueryInterface {
 | 
			
		|||
  function get_result_entities($results, $relationship = NULL) {
 | 
			
		||||
    return FALSE;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,6 +14,8 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
use Drupal\Core\Annotation\Translation;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @todo.
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "views_query",
 | 
			
		||||
 *   title = @Translation("SQL Query"),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * A special handler to take the place of missing or broken handlers.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_relationship_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "broken"
 | 
			
		||||
 * )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -59,10 +59,8 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * in the same way as node_comment_statistics.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_relationship_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @plugin(
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "groupwise_max"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			@ -391,4 +389,5 @@ class GroupwiseMax extends RelationshipPluginBase {
 | 
			
		|||
 | 
			
		||||
    $this->alias = $this->query->add_relationship($alias, $join, $this->definition['base'], $this->relationship);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,13 +41,8 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 *
 | 
			
		||||
 * @ingroup views_relationship_handlers
 | 
			
		||||
 */
 | 
			
		||||
abstract class RelationshipPluginBase extends Handler {
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "standard"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class RelationshipPluginBase extends Handler {
 | 
			
		||||
  /**
 | 
			
		||||
   * Init handler to let relationships live on tables other than
 | 
			
		||||
   * the table they operate on.
 | 
			
		||||
| 
						 | 
				
			
			@ -167,6 +162,7 @@ class RelationshipPluginBase extends Handler {
 | 
			
		|||
  function use_group_by() {
 | 
			
		||||
    return FALSE;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
<?php
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Definition of Drupal\views\Plugin\views\relationship\Standard.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
namespace Drupal\views\Plugin\views\relationship;
 | 
			
		||||
 | 
			
		||||
use Drupal\Core\Annotation\Plugin;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Default implementation of the base relationship plugin.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_relationship_handlers
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "standard"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Standard extends RelationshipPluginBase {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -17,9 +17,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * or not.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_row_plugins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "fields",
 | 
			
		||||
 *   title = @Translation("Fields"),
 | 
			
		||||
| 
						 | 
				
			
			@ -32,6 +30,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Fields extends RowPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -102,4 +101,5 @@ class Fields extends RowPluginBase {
 | 
			
		|||
  function options_submit(&$form, &$form_state) {
 | 
			
		||||
    $form_state['values']['row_options']['inline'] = array_filter($form_state['values']['row_options']['inline']);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,6 +25,7 @@ use Drupal\views\Plugin\views\Plugin;
 | 
			
		|||
 * a theme function.
 | 
			
		||||
 */
 | 
			
		||||
abstract class RowPluginBase extends Plugin {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Initialize the row plugin.
 | 
			
		||||
   */
 | 
			
		||||
| 
						 | 
				
			
			@ -149,6 +150,7 @@ abstract class RowPluginBase extends Plugin {
 | 
			
		|||
        'field_alias' => isset($this->field_alias) ? $this->field_alias : '',
 | 
			
		||||
      ));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,9 +12,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 | 
			
		||||
/**
 | 
			
		||||
 * Renders an RSS item based on fields.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "rss_fields",
 | 
			
		||||
 *   title = @Translation("Fields"),
 | 
			
		||||
| 
						 | 
				
			
			@ -27,6 +25,7 @@ use Drupal\Core\Annotation\Translation;
 | 
			
		|||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class RssFields extends RowPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
    $options['title_field'] = array('default' => '');
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * A special handler to take the place of missing or broken handlers.
 | 
			
		||||
 *
 | 
			
		||||
 * @ingroup views_sort_handlers
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 * @Plugin(
 | 
			
		||||
 *   id = "broken"
 | 
			
		||||
 * )
 | 
			
		||||
 */
 | 
			
		||||
class Broken extends SortPluginBase {
 | 
			
		||||
 | 
			
		||||
  function ui_name($short = FALSE) {
 | 
			
		||||
    return t('Broken/missing handler');
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -37,4 +36,5 @@ class Broken extends SortPluginBase {
 | 
			
		|||
   * Determine if the handler is considered 'broken'
 | 
			
		||||
   */
 | 
			
		||||
  function broken() { return TRUE; }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,9 +18,9 @@ use Drupal\Core\Annotation\Plugin;
 | 
			
		|||
 * @Plugin(
 | 
			
		||||
 *   id = "date"
 | 
			
		||||
 * )
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
class Date extends SortPluginBase {
 | 
			
		||||
 | 
			
		||||
  function option_definition() {
 | 
			
		||||
    $options = parent::option_definition();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -78,4 +78,5 @@ class Date extends SortPluginBase {
 | 
			
		|||
    // Add the field.
 | 
			
		||||
    $this->query->add_orderby(NULL, $formula, $this->options['order'], $this->table_alias . '_' . $this->field . '_' . $this->options['granularity']);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue