mkdir my-drupal10-site
cd my-drupal10-site
ddev config --project-type=drupal10 --docroot=web
ddev start
ddev composer create drupal/recommended-project
ddev composer require drush/drush
ddev drush site:install minimal --account-name=admin --account-pass=admin -y
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
\Drupal::service('file_url_generator')->generate($uri)->toString() |
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(){"use strict";var e={706:function(e,t){t.cvM=t.vGE=t.WHt=t.ZzO=t.Gse=t.ut0=t.mYg=t.yEG=t.WOA=t.kFl=t.Js5=t.v_8=t.Hg3=t.dOj=t.T_N=t.x$q=t.R7_=t.oSj=t.Q9h=t.Z79=t.UiT=t.oqV=t.qsz=t.$2j=t.q1T=t.xZO=t.fcK=t.PO7=t.$6P=t.kKn=t.D2v=t.FIm=t.Kii=t.kD0=t.xl3=t.DW9=t.bBW=t.Qsy=t.UfV=t.T6x=t.vyl=t.hhn=t.G32=t.ND5=t.bD3=t.v_6=t.Xc8=t.MML=t.BFF=t.fh=t.v1D=t.jxS=t.KL0=t.toh=t.G7g=t.dJP=t.ZJ=t.dfk=t.pLL=t.PSh=t.qgH=t.tH8=t.bOt=t.m$v=t.DJT=t.RGs=t.zC$=t.xFm=t.N9$=t.cee=t.m$S=t.iey=t.zHY=t.XI0=t.Erg=t.qNI=t.ARv=t.xGw=t.hHB=t.suw=t.IKv=t.ssq=t.rQN=t.IWh=t.uWC=t.SI=t.M9R=t.qLM=t.FHt=t.Ucp=t.p$b=t.V76=t.RYE=t.Hrn=t.sHO=t.vi3=t.Yqf=t.SyC=t.xTH=t.Q7m=t.xJt=t.lGG=t.FF=t.$Hs=t.taD=t.Wb5=t.j81=t.Gbw=t.$im=t.T_1=t.FkM=t.tPH=t.Iwq=void 0,t.Iwq="HkocEodjb7",t.tPH="87JYasXPF",t.FkM="ko1w5PpFl",t.T_1="XYQZBUojc",t.$im="r5-Z_erQ0",t.Gbw="BJz7qNsdj-7",t.j81="HyEX5Nidi-m",t.Wb5="wgTnPe7i1",t.taD="HkPBYFofN",t.$Hs="S1_9Vsuj-Q",t.FF="S1_9Vsuj-Q",t.lGG="SkPc5EjOsWm",t.xJt="HyeqVsdjWX",t.Q7m="Ouzxu26Rv",t.xTH="S1pcEj_jZX",t.SyC="BJTzqN |
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
# Regex for deprecated forloop/in-query combinations in twig. Ex.: {% for n in numbers if n > 3 %} | |
\{%-? for .+ in .+ if .+ -?%} |
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 | |
drush eval '$entity_type = "shortcut"; $storage_handler = \Drupal::entityTypeManager()->getStorage($entity_type); $storage_handler->delete($storage_handler->loadMultiple(\Drupal::entityQuery($entity_type)->execute()));' |
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
SELECT | |
TABLE_NAME AS `Table`, | |
ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)` | |
FROM | |
information_schema.TABLES | |
WHERE | |
TABLE_SCHEMA = "my_database_name" | |
ORDER BY | |
(DATA_LENGTH + INDEX_LENGTH) | |
DESC; |
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\my_module\Fields; | |
use Drupal\Core\Entity\EntityPublishedInterface; | |
use Drupal\Core\Field\EntityReferenceFieldItemList; | |
use Drupal\Core\TypedData\ComputedItemListTrait; | |
use Drupal\Core\Url; | |
class MenuTeasers extends EntityReferenceFieldItemList { |
NewerOlder