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
namespace Drupal\bebooking\Plugin\Block;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Entity\EntityTypeManager;
use Drupal\Core\Entity\Query\QueryFactory;
<?php
namespace Drupal\booking_journal\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Datetime\DrupalDateTime;
use Drupal\node\NodeInterface;
use Drupal\node\NodeStorage;
use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\booking_journal\Entity\JournalEvent;
<?php
namespace Drupal\gallery_port\Form;
use Drupal\Core\File\FileSystem;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\file\Entity\File;
use Drupal\gallery\Entity\PhotoGallery;
/**
* Drupal\Core\Entity\EntityTypeManager definition.
*
* @var \Drupal\Core\Entity\EntityTypeManager
*/
protected $entityTypeManager;
/**
* Drupal\Core\Entity\Query\QueryFactory definition.
*
* @var \Drupal\Core\Entity\Query\QueryFactory
<?php
namespace Drupal\telegram_holiday\Controller;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Config\ConfigFactory;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Entity\Query\QueryFactory;
use Drupal\holiday\Entity\Inquiry;
<?php
/**
* Created by PhpStorm.
* User: Lex
* Date: 09.03.2017
* Time: 22:37
*/
namespace Drupal\telegram_holiday\Commands;
uuid: b7b56de2-9392-4fea-beab-6459d18329d7
langcode: ru
status: true
dependencies: { }
id: '205684384'
label: 'Notify:205684384'
start: 1489160591
fromid: 205684384
question: null
command: inquiry
@cyberlex404
cyberlex404 / page_manager.page.front.yml
Created March 13, 2017 23:09
Empty Drupal 8 Front page
uuid: 8a95034a-82e4-4cfe-bc49-7005178ce5f0
langcode: ru
status: true
dependencies: { }
id: front
label: Front
description: ''
use_admin_theme: false
path: /front
access_logic: and
@cyberlex404
cyberlex404 / Drupal 8 Composer Example
Created March 16, 2017 18:03 — forked from mariagwyn/Drupal 8 Composer Example
Composer build file for a Drupal 8 site
{
"name": "Drupal 8 Composer Build",
"description": "Project json for a Drupal 8 sites",
"type": "project",
"require": {
"composer/installers": "^1.0.20",
"drupal-composer/drupal-scaffold": "^2.0.0",
"cweagans/composer-patches": "^1.5.0",
"drupal/core": "~8",
"drupal/lightning": "~8.1",
<?php
namespace Drupal\holiday\Form;
use Drupal\Core\Datetime\DateFormatter;
use Drupal\Core\Datetime\DrupalDateTime;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\holiday\Entity\Inquiry;
use Drupal\holiday\Event\InquiryAdded;