pluginTitle example



    $options['title'] = [
      'category' => 'title',
      'title' => $this->t('Title'),
      'value' => views_ui_truncate($title, 32),
      'desc' => $this->t('Change the title that this display will use.'),
    ];

    $style_plugin_instance = $this->getPlugin('style');
    $style_summary = empty($style_plugin_instance->definition['title']) ? $this->t('Missing style plugin') : $style_plugin_instance->summaryTitle();
    $style_title = empty($style_plugin_instance->definition['title']) ? $this->t('Missing style plugin') : $style_plugin_instance->pluginTitle();

    $options['style'] = [
      'category' => 'format',
      'title' => $this->t('Format'),
      'value' => $style_title,
      'setting' => $style_summary,
      'desc' => $this->t('Change the way content is formatted.'),
    ];

    // This adds a 'Settings' link to the style_options setting if the style has     // options.


  /** * Tests perm access plugin. */
  public function testAccessPerm() {
    $view = Views::getView('test_access_perm');
    $view->setDisplay();

    $access_plugin = $view->display_handler->getPlugin('access');
    $this->assertInstanceOf(Permission::class$access_plugin);
    $this->assertEquals('Permission', $access_plugin->pluginTitle());

    $this->assertFalse($view->display_handler->access($this->webUser));
    $this->assertTrue($view->display_handler->access($this->normalUser));
  }

  /** * Tests access on render caching. */
  public function testRenderCaching() {
    $view = Views::getView('test_access_perm');
    $display = &$view->storage->getDisplay('default');
    
Home | Imprint | This part of the site doesn't use cookies.