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
# | |
# Based on https://hub.docker.com/_/sonarqube | |
# | |
version: "3.7" | |
services: | |
sonarqube: | |
container_name: sonarqube | |
image: arm64v8/sonarqube:latest |
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 | |
use DrupalUtils\EntityConvert\EntityConvert; | |
$entityConvert = new EntityConvert(); | |
// $instance == Node/User/Taxonomy/File. | |
$entityConvert->toArray($instance, true); | |
$entityConvert->toObject($instance, false); | |
// The toArray method accepts 2 arguments. |
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 | |
use Drupal\node\Entity\Node; | |
// Include the library. | |
use DrupalUtils\EntityConvert\EntityConvert; | |
// Load instance of node | |
$node = Node::load(1); | |
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 | |
use Drupal\Node\Entity\Node; | |
use DrupalUtils\EntityConvert\EntityConvert; | |
// Load instance of node | |
$node = Node::load(1); | |
// Creating a new Instance. | |
$entityConvert = new EntityConvert(); |
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 | |
use Drupal\Node\Entity\Node; | |
use DrupalUtils\EntityConvert\EntityConvert; | |
// Load instance of node | |
$node = Node::load(1); | |
// Creating a new Instance. | |
$entityConvert = new EntityConvert(); |
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\rest_auth\Authentication; | |
use Drupal\Core\Authentication\AuthenticationProviderInterface; | |
use Symfony\Component\HttpFoundation\Request; | |
use Drupal\Core\Session\UserSession; | |
use Symfony\Component\HttpKernel\Exception\HttpException; | |
/** |
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 | |
function vehicle_update_8001() { | |
$database = \Drupal::database(); | |
$transaction = $database->startTransaction(); | |
$entity_type_manager = \Drupal::entityTypeManager(); | |
// The entity whose field type needs to be updated. | |
$bundle_of = 'vehicle'; |
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 | |
class Invitation { | |
/** | |
* Callback handler for HTTP Patch request. | |
* @param int|null $id | |
* @param Request|null $request | |
*/ | |
public function patch(int $id = NULL, Request $request = NULL) { |
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\Tests\authzero\Unit; | |
use Drupal\authzero\Service\AuthZeroService; | |
use Drupal\Core\Config\ConfigFactoryInterface; | |
use Drupal\Core\Config\ImmutableConfig; | |
use Drupal\Core\DependencyInjection\ContainerBuilder; | |
use Drupal\Tests\UnitTestCase; | |
use Symfony\Component\HttpFoundation\Request; |
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\authzero\Service; | |
use Drupal\Core\Config\ConfigFactoryInterface; | |
/** | |
* Set of utility functions. | |
*/ | |
class AuthZeroService { |
NewerOlder