Skip to content

Instantly share code, notes, and snippets.

View cyberlex404's full-sized avatar
🏠
Working from home

Lex Misiuro cyberlex404

🏠
Working from home
View GitHub Profile
<?php
echo('Hello');
?>
name = Islands
description = Islands connect.
package = Islands
core = 7.x
function akselslider_libraries_info() {
return array(
'swiper' => array(
'name' => 'swiper',
'library path' => drupal_get_path('module', 'akselslider'),
// 'version callback' => , // Set a callback here to get the version in use.
'version arguments' => array(),
'variants' => array(),
'cdn' => array(
@cyberlex404
cyberlex404 / HooverMediaBlock.php
Created September 17, 2016 18:11
Блок с контекстом
<?php
namespace Drupal\hoover\Plugin\Block;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\file\Entity\File;
use Drupal\image\Entity\ImageStyle;
<?php
/**
* @file
* Contains hoover.module..
*/
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Template\Attribute;
use Drupal\node\Entity\NodeType;
swiper_photos:
version: 1.x
css:
theme:
css/swiper_photos.css: {}
js:
js/swiper_photos.js: {}
dependencies:
- swiper/swiper
swiper:
remote: https://github.com/nolimits4web/Swiper
version: 3.3.1
license:
name: MIT
url: https://github.com/nolimits4web/Swiper/blob/master/LICENSE
gpl-compatible: true
css:
theme:
https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.3.1/css/swiper.min.css: { type: external, minified: false }
{#
/**
* @file
* Default theme implementation for a swiper hoover media block.
*
* Available variables:
* - items: List of slider element.
* - thumbnail: URL image thumbnail
* - large_img: URL large image
* - attributes: Classes.
@cyberlex404
cyberlex404 / yamapsapi.libraries.yml
Created September 29, 2016 14:49
Add yandex API 2.1 & Glyphicons
yamaps21:
remote: https://api-maps.yandex.ru
version: 2.1
license:
name: MIT
url: https://api-maps.yandex.ru
gpl-compatible: true
css:
theme:
<?php
namespace Drupal\thomas_service\Form;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\taxonomy\Entity\Term;
use Drupal\thomas_service\Entity\ServiceCenter;