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
function dd($data) { | |
echo '<pre>'; | |
var_dump($data); | |
echo '</pre>'; | |
die(); | |
} |
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 | |
* Defines Drupal hooks for euroradio_paragraphs module. | |
*/ | |
use Drupal\Component\Serialization\Json; | |
use Drupal\Core\Cache\Cache; | |
use Drupal\Core\Entity\EntityInterface; |
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 | |
namespace Drupal\euroradio_program\Plugin\views\field; | |
use Drupal\Core\Entity\EntityTypeManagerInterface; | |
use Drupal\Core\Language\LanguageManagerInterface; | |
use Drupal\euroradio_player\PlayerRenderHelper; | |
use Drupal\file\Entity\File; | |
use Drupal\views\Plugin\views\display\DisplayPluginBase; | |
use Drupal\views\Plugin\views\field\FieldPluginBase; |
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 | |
* Contains prevalat_checkout.module. | |
*/ | |
use Drupal\Core\Url; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\commerce_product\Entity\Product; |
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 nodeFormAlter(array &$form, FormStateInterface $formState): void { | |
$node = $formState->getFormObject()->getEntity(); | |
if (isset($form['status'])) { | |
$form['status']['#group'] = '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
/** | |
* Implements hook_views_query_alter() for restrict duplicated nodes. | |
*/ | |
function euroradio_api_yandex_views_query_alter(ViewExecutable $view, QueryPluginBase $query) { | |
switch($view->storage->id()){ | |
case 'yandex_rss'; | |
// $query->addField('entity_type', 'id', '', ['function' => 'groupby']); | |
// $query->addGroupBy('entity_type.id'); | |
$query->addField('node_field_data', 'nid', '', ['function' => 'groupby']); |
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
function porto_sub_preprocess_views_view(&$variables) { | |
$variables['current_url'] = \Drupal::request()->query->get('blog'); | |
} |
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
// Add active-item class if element checked. | |
$('.form-item-field-category-tid-i18n input').each(function() { | |
if($(this).is(":checked")) { | |
$(this).parent().addClass('active-item'); | |
} | |
}); |
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
{% block paragraph %} | |
<div{{ attributes.addClass(classes) }}> | |
{% block content %} | |
<a href="{{ content.field_card_link.0['#url'] }}"> | |
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 lo-use-item fadeIn wow animated animated animated" style="visibility: visible;"> | |
<span class="bg-animate"> | |
{{ content|without("field_card_link") }} | |
</span> | |
</div> | |
</a> |