attachDisplays example

// Setup the expectations.     $cloned_view = $this->getMockBuilder('Drupal\views\ViewExecutable')
      ->disableOriginalConstructor()
      ->getMock();
    $this->viewExecutableFactory
      ->method('get')
      ->willReturn($cloned_view);
    $page_display->expects($expected_to_be_attached ? $this->once() : $this->never())
      ->method('attachTo')
      ->with($cloned_view, 'default', $view->element);

    $view->attachDisplays();
  }

  /** * Provider for testAttachDisplays(). * * @return array[] * An array of arrays containing the display state, a user's access to the * display and whether it is expected or not that the display gets attached. */
  public function providerAttachDisplays() {
    return [
      

    }

    // Build all the filters.     $this->_build('filter');

    $this->build_sort = TRUE;

    // Arguments can, in fact, cause this whole thing to abort.     if (!$this->_buildArguments()) {
      $this->build_time = microtime(TRUE) - $start;
      $this->attachDisplays();
      return $this->built;
    }

    // Initialize the style; arguments may have changed which style we use,     // so waiting as long as possible is important. But we need to know     // about the style when we go to build fields.     if (!$this->initStyle()) {
      $this->build_info['fail'] = TRUE;
      return FALSE;
    }

    
Home | Imprint | This part of the site doesn't use cookies.