This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* @ViewsStyle( | |
* id = "scroller", | |
* title = @Translation("Scroller"), | |
* help = @Translation("Render a listing of view data."), | |
* theme = "views_view_scroller", | |
* display_types = { "normal" } | |
* ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Scroller extends StylePluginBase { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function defineOptions() { | |
$options = parent::defineOptions(); | |
$options['height'] = array('default' => '354'); | |
return $options; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function buildOptionsForm(&$form, FormStateInterface $form_state) { | |
parent::buildOptionsForm($form, $form_state); | |
$form['height'] = array( | |
'#type' => 'textfield', | |
'#title' => $this->t('Height'), | |
'#description' => $this->t('Default height of header.'), | |
'#size' => '6', | |
'#default_value' => $this->options['height'], | |
'#required' => TRUE, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* My Scroller Views module help and theme functions. | |
*/ | |
// Store Scroller preprocess theme functions in a separate .inc file. | |
\Drupal::moduleHandler()->loadInclude('my_scroller', 'inc', 'my_scroller.theme'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Theme for My Scroller views. | |
*/ | |
/** | |
* Prepares variables for views scroller templates. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* theme = "views_view_scroller", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YAML | |
- | |
name: 'Parent 1' | |
children: | |
- | |
name: 'Child 1' | |
children: | |
- | |
name: 'Child 11' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$manager = \Drupal::service('features.manager'); | |
$module = 'MODULE_MACHINE_NAME'; | |
$feature = $manager->loadPackage($module, TRUE); | |
$config_to_create = [ | |
'CONFIG_NAME_1' => '', | |
'CONFIG_NAME_2' => '', | |
]; | |
// Import the configurations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: osseed/drupal8:7.2 | |
- image: circleci/mysql:5.7 | |
environment: | |
MYSQL_DATABASE: drupal | |
MYSQL_ROOT_USERNAME: root | |
MYSQL_ROOT_PASSWORD: root |