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 | |
/** | |
* Change function kint in devel/kint/kint.module | |
* | |
* Show $var up to level 6 | |
* kint($var, ['kint_maxLevels' => 6]), | |
*/ | |
function kint() { | |
kint_require(); | |
if (\Drupal::currentUser()->hasPermission('access kint')) { |
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 | |
/** | |
* Implements hook_search_api_solr_query_alter() | |
* | |
* В SearchApiSolrService::createFilterQuery Нету оператора "между". | |
* При использовании facetapi ranges с multivalued полями, возникают проблемы. | |
* @see https://www.drupal.org/node/1783746#comment-11813009 | |
* Чтобы не хачить сразу кучу модулей, мы добавим костыль сюда. | |
* Если пользователь в запросе выбрал наш фасет, то мы удаляем значения фильтра, | |
* которые используют этот же фасет и вставляем наш фильтр вида [40 от 50]. |
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
/* | |
* Take a set of full height screenshots for a range of screensizes. | |
* phantomjs responsive-screens.js http://www.cnn.com/ png | |
* | |
* This will create a directory tree in your current directory which | |
* mirrors the URL. All files will be named with the current time. | |
* You can run this on a cron to build an archive of screenshots. | |
**/ | |
var page = new WebPage(), |