Drupal - Riptutorial

Transcription

drupal#drupal

11: drupal22Examples2Drushal Drupal2Drupal Console Drupal 82(Drupal Concepts)32: Drupal 8 Entity API55Examples5Drupal Console51 :52 :53: Drupal 8 APIAPIExamplesDrupal 8 Queue API Batch API4: Drush6661212Drush 313Drush131314

0206: (Drupal)2121Examples21Drupal217: - (Drupal 7)2222Examples222222.2324.25custom module.install268:2828Examples28

UI9:283030Examples30303110: - Drupal 7Examples3333.info33.info3311:353535Examples353538

You can share this PDF with anyone you feel could benefit from it, downloaded the latest versionfrom: drupalIt is an unofficial and free drupal ebook created for educational purposes. All the content isextracted from Stack Overflow Documentation, which is written by many hardworking individuals atStack Overflow. It is neither affiliated with Stack Overflow nor official drupal.The content is released under Creative Commons BY-SA, and the list of contributors to eachchapter are provided in the credits section at the end of this book. Images may be copyright oftheir respective owners unless otherwise specified. All trademarks and registered trademarks arethe property of their respective company owners.Use the content presented in this book at your own risk; it is not guaranteed to be correct noraccurate, please send your feedback and corrections to e1

1: drupalDrupal PHP. Drupal.Drupal : 7 8 . Drupal 8 SymfonyDrupal.ExamplesDrushal Drupaldrush dl drupal --drupal-project-rename examplecd exampledrush site-install standard --db-url 'mysql://[db user]:[db pass]@localhost/[db name]' --sitename ExampleDrupal Console Drupal 8(Drupal)(Drupal CLI).Drupal.Drupal Console .(Drupal Console).# Run this in your terminal to get the latest project version:curl https://drupalconsole.com/installer -L -o drupal.phar# Or if you don't have curl:php -r "readfile('https://drupalconsole.com/installer');" drupal.phar# Accessing from anywhere on your system:mv drupal.phar /usr/local/bin/drupal# Apply executable permissions on the downloaded file:chmod x /usr/local/bin/drupal# Copy configuration files to user home directory:drupal init --override# Check and validate system requirementsdrupal check.drupal listDrupal .drupal ome2

, (Drupal.drupal site:installDrupal .Drupal5 7.(Drupal Concepts)Release Date8.2.42016 12 77.532016 12 76.38 ( )2016 2 245.23 ( )2010 8 11Drupal. Entity API. Fieldable Drupal . Drupal Entity . () .() ,(). Drupal 7 Fields API( )() ., () .,HTML. DecimalLong Text,.,entity load.entity access ()) ./. ,.Entity API(entity create (), entity save (), entity delete (), entity view ().OOD / P(). https://riptutorial.com/ko/home3

. . , , .4 OOD / P()(:). Entity API .drupal : l-https://riptutorial.com/ko/home4

2: Drupal 8 Entity APIDrupal 8 (Entity System). API , , ,.ExamplesDrupal Console(Drupal ) (Drupal).1 :vendor/bin/drupal generate:module.2 :vendor/bin/drupal generate:entity:content.Drupal 8 Entity API : al-8-entity-apihttps://riptutorial.com/ko/home5

3: Drupal 8 APIAPIExamplesDrupal 8 Queue API Batch APIxml import example.info.ymltype: modulename: XML import examplepackage: Examplesdescription: "This module helps understanding the Batch API and Queue API with an XML importexample"core: 8.xxml import example.permissions.ymlimport content from xml:title: 'Import content from xml'description: 'With this permission user can import contents from a XML source'restrict access: TRUExml import example.routing.yml# Get contents from the xml sourcexml import example.get contents from xml:path: '/get-contents-from-xml'defaults: { controller:'\Drupal\xml import tsFromXMLPage' }requirements:permission: 'import content from xml'# Process all queue items with batchxml import example.process all queue items with batch:path: '/process-all-queue-items'defaults: { controller:'\Drupal\xml import lQueueItemsWithBatch' }requirements:permission: 'import content from xml'src / Controller / ImportContentFromXML.php ?php/*** @file* Contains \Drupal\xml import e Drupal\xml import example\Controller;use erface;use Drupal\Core\Controller\ControllerBase;use torial.com/ko/home6

use Drupal\Core\Queue\QueueFactory;/*** You can use this constant to set how many queued items* you want to be processed in one batch operation*/define("IMPORT XML BATCH SIZE", 1);class ImportContentFromXML extends ControllerBase {/*** We add QueueFactory and QueueWorkerManager services with the Dependency Injectionsolution*//*** @var QueueFactory*/protected queueFactory;/*** @var QueueWorkerManager*/protected queueManager;/*** {@inheritdoc}*/public function construct(QueueFactory queue factory, QueueWorkerManager queue manager){ this- queue factory queue factory; this- queue manager queue manager;}/*** {@inheritdoc}*/public static function create(ContainerInterface container) { queue factory container- get('queue'); queue manager container- get('plugin.manager.queue worker');return new static( queue factory, queue manager);}/*** Get XML from the API and convert it to*/protected function getContentsFromXML() {// Here you should get the XML content and convert it to an array of content arrays forexample// I use now an example array of contents: contents array();for ( i 1; i 20; i ) { contents[] array('title' 'Test title ' . i,'body' 'Test body ' . i,);}// Return with the contentshttps://riptutorial.com/ko/home7

return contents;}/*** Page where the xml source is preprocessed*/public function getContentsFromXMLPage() {// Get contents array contents this- getContentsFromXML();foreach ( contents as content) {// Get the queue implementation for import content from xml queue queue this- queue factory- get('import content from xml');// Create new queue item item new \stdClass(); item- data content; queue- createItem( item);}return array('#type' 'markup','#markup' this- t('@count queue items are created.', array('@count' count( contents))),);}/*** Process all queue items with batch*/public function processAllQueueItemsWithBatch() {// Create batch which collects all the specified queue items and process them one afteranother batch array('title' this- t("Process all XML Import queues with batch"),'operations' array(),'finished' 'Drupal\xml import shed',);// Get the queue implementation for import content from xml queue queue factory \Drupal::service('queue'); queue queue factory- get('import content from xml');// Count number of the items in this queue, and create enough batch operationsfor( i 0; i ceil( queue- numberOfItems() / IMPORT XML BATCH SIZE); i ) {// Create batch operations batch['operations'][] array('Drupal\xml import ess', array());}// Adds the batch setsbatch set( batch);// Process the batch and after redirect to the frontpagereturn batch process(' front ');}/*** Common batch processing callback for all operations.*/https://riptutorial.com/ko/home8

public static function batchProcess(& context) {// We can't use here the Dependency Injection solution// so we load the necessary services in the other way queue factory \Drupal::service('queue'); queue manager \Drupal::service('plugin.manager.queue worker');// Get the queue implementation for import content from xml queue queue queue factory- get('import content from xml');// Get the queue worker queue worker queue manager- createInstance('import content from xml');// Get the number of items number of queue ( queue- numberOfItems() IMPORT XML BATCH SIZE) ? queue numberOfItems() : IMPORT XML BATCH SIZE;// Repeat number of queue timesfor ( i 0; i number of queue; i ) {// Get a queued itemif ( item queue- claimItem()) {try {// Process it queue worker- processItem( item- data);// If everything was correct, delete the processed item from the queue queue- deleteItem( item);}catch (SuspendQueueException e) {// If there was an Exception trown because of an error// Releases the item that the worker could not process.// Another worker can come and process it queue- releaseItem( item);break;}}}}/*** Batch finished callback.*/public static function batchFinished( success, results, operations) {if ( success) {drupal set message(t("The contents are successfully imported from the XML source."));}else { error operation reset( operations);drupal set message(t('An error occurred while processing @operation with arguments :@args', array('@operation' error operation[0], '@args' print r( error operation[0],TRUE))));}}}src / Plugin / QueueWorker / ImportContentFromXMLQueueBase.php ?php/*** @file* Contains Drupal\xml import ueBasehttps://riptutorial.com/ko/home9

*/namespace Drupal\xml import ** Provides base functionality for the Import Content From XML Queue Workers.*/abstract class ImportContentFromXMLQueueBase extends QueueWorkerBase implementsContainerFactoryPluginInterface {// Here we don't use the Dependency Injection,// but the create method and construct method are necessary to implement/*** {@inheritdoc}*/public function construct() {}/*** {@inheritdoc}*/public static function create(ContainerInterface container, array configuration, plugin id, plugin definition) {return new static();}/*** {@inheritdoc}*/public function processItem( item) {// Get the content array content item- data;// Create node from the array this- createContent( content);}/*** Create content** @return int*/protected function createContent( content) {// Create node object from the content array node Node::create(array('type' 'page','title' content['title'],'body' array('value' content['body'],'format' 'basic html',),)); node- save();}}https://riptutorial.com/ko/home10

src / Plugin / QueueWorker / ImportContentFromXMLQueue.php ?phpnamespace Drupal\xml import example\Plugin\QueueWorker;/*** Create node object from the imported XML content** @QueueWorker(*id "import content from xml",*title @Translation("Import Content From XML"),*cron {"time" 60}* )*/class ImportContentFromXMLQueue extends ImportContentFromXMLQueueBase {},./ get-contents-from-xml URL 20.src / Plugin / QueueWorker / ImportContentFromXMLQueue.phpcron60 .: cron { "time" 60}.cron { "time" 60} cron.url . / process-all-queue-items,, .Drupal 8 APIAPI : l-8--api----api-https://riptutorial.com/ko/home11

4: DrushDrush ?Drush Drupal. Drupal.ExamplesDrushDrushdrush statusDrupal. , URI, , ,.Drush Drupal.drush upwd admin --password "newpassword""admin""newpassword" .URLdrush uliadminURL . URL . Xo3YGKAUHCknFQF0rEPJ itkS-a6I8LJwaNYs/loginIP.default does not appear to be a resolvable hostname or IP, not starting browser.[warning]You may need to use the --uri option in your command or site alias to indicatethe correct URL of this site.http://default/user/reset/1/1469178629/-zFS 0u8is2N2uCKuLUdGBpJ3cZzV9am5 irsbtVAOs/login"--url" .drush uli --uri "http://example.com/"drush cache-rebuildhttps://riptutorial.com/ko/home12

Drupal 8 . drupal 7 ,drush cache-cleardrush crdrush cc // optionally pass all to clear all the cachesdrush pm-enable mymodule'mymodule'drush en mymodule // optionally pass the -y option to avoid the interactive questionMainteneaceDrush.drush vset maintenance mode 1 // pass 0 to disable the maintenance/.(Drupal) 7 ( Features).drush features-update [feature-name] // e.g. drush features-update content type news.drush fu [feature-name]" " Drupal 8. drush.drush config-export // optionally add -y to not have to verify it.drush cex -yDrushOS X Linux :1.https://riptutorial.com/ko/home13

, Bash .2. /:# Download latest stable release using the code below or browse to github.com/drushops/drush/releases.php -r "readfile('http://files.drush.org/drush.phar');" drush# Or use our upcoming release: php -r ar');" drush# Test your install.php drush core-status# Make drush executable as a command from anywhere. Destination can be anywhere on PATH.chmod x drushsudo mv drush /usr/local/bin# Optional. Enrich the bash startup file with completion and aliases.drush initWindows :1. GitHub Drush2. ,.C:\3. DrushApache, PHP and mpp\php;C:\drush;4. Drush .drush status1. Composer .2. / .bash profile (OS X) / .bashrc (Linux) exportComposer bin .3. Drush :PATH " HOME/.composer/vendor/bin: PATH"composer global require drush/drush4. Drush .drush statusDrushDrushhttps://riptutorial.com/ko/home14

.php -r "readfile('http://files.drush.org/drush.phar');" drushchmod x drushsudo mv drush /usr/local/bindrush init # Add alias in bash startup file.composer global require drush/drush:dev-masterDrush : https://riptutorial.com/ko/home15

5:.Drupal. : Johan Falk (Drupal) 7 nodeone.se . " nodeone.se the Rules Framework " nodeone.se .nodeone.se 30nodeone.se (license Attribution-Noncommercial -Share Alike 3.0 ).nodeone.se. Learn Rules Tiny Book of Rules().(15 ) .ExamplesUIhttps://riptutorial.com/ko/home16

.{ "rules display userpoints after updating content" : {"LABEL" : "Display userpoints after updating content","PLUGIN" : "reaction rule","OWNER" : "rules","REQUIRES" : [ "userpoints rules", "rules", "rules conditional" ],"ON" : { "node update" : [] },"DO" : [{ "userpoints rules get current points" : {"USING" : { "user" : [ "site:current-user" ], "tid" : "all" },https://riptutorial.com/ko/home17

"PROVIDE" : { "loaded points" : { "total points" : "Number of points in allcategories together" } }}},{ "drupal message" : { "message" : "You now have [total-points:value] points" } },{ "CONDITIONAL" : [{"IF" : { "NOT data is" : { "data" : [ "total-points" ], "op" : "\u003C", "value" :"20" } },"DO" : [{ "drupal message" : { "message" : "You have sufficient points (you still have[total-points:value] .)." } }]},{ "ELSE" : [{ "drupal message" : { "message" : "You DO NOT have sufficient points (you onlyhave [total-points:value] .)." } }]}]}]}}( ). 20 "You have enough points ." , "You have not enough points ." . ( ).{ "rules calculate sum of prices in all field collection items" : {"LABEL" : "Calculate sum of prices in all field collection items","PLUGIN" : "reaction rule","OWNER" : "rules","REQUIRES" : [ "rules" ],"ON" : { "node view--article" : { "bundle" : "article" } },"IF" : [{ "entity has field" : { "entity" : [ "node" ], "field" : "field article details" } }],"DO" : [{ "drupal message" : { "message" : u003E started ." } },{ "variable add" : {"USING" : { "type" : "decimal", "value" : "0" },"PROVIDE" : { "variable added" : { "total price" : "Price total" } }}},{ "LOOP" : {"USING" : { "list" : [ "node:field-article-details" ] },"ITEM" : { "article details item" : "Article details item" },"DO" : [{ "data calc" : {"USING" : {"input 1" : [ "total-price" ],"op" : " ","input 2" : [ "article-details-item:field-price" ]},"PROVIDE" : { "result" : { "calculation result" : "Calculation result" } }}},https://riptutorial.com/ko/home18

{ "data set" : { "data" : [ "total-price" ], "value" : [ "calculation-result" ] }},{ "drupal message" : { "message" : "After adding a price ice]\u003C\/strong\u003E for field collectionitem with id 003C\/strong\u003E, subtotal 3C\/strong\u003E." } }]}},{ "drupal message" : { "message" : "The \u003Cstrong\u003ETotalprice\u003C\/strong\u003E for all prices included as field collection items ong\u003E." } },{ "drupal message" : { "message" : u003E ended ." } }]}}.:(Article Type) ,.article:""field article details.:, (?) .:1.(Drupal) .2., total price , (2 ), 0 .3. (machine name field article details )( 2 ) article-details-item:field-pricecalculation result .total pricetotal pricecalculation resultcalculation result calculation resulttotal price.(. 2 10 ), ()( 2 ). : ( ), total price.id 19

5.(Drupal) .,. 23(). , Drupal .Drupal calculator started .After adding a price of 2.45 for field collection item withAfter adding a price of 9.15 for field collection item withAfter adding a price of 3.40 for field collection item withAfter adding a price of 1.23 for field collection item withThe Total price for all prices included as field collectionDrupal calculator ended .id 1,id 2,id 3,id 4,itemssubtotal issubtotal issubtotal issubtotal isis 26.23.2.45.11.60.15.00.16.23." " .: s://riptutorial.com/ko/home20

6: (Drupal). Drupal inbuilt. Varnish, Memcache, Authcache, File cacheDrupal inbuilt .ExamplesDrupal(Drupal). DrupalDrupal Drupal1. - - .2.3. JS / CSS?. "".,. Drupal 6 :.(Drupal 7 :1. - - - .2.3. JS / CSS .(Drupal): upal----https://riptutorial.com/ko/home21

7: - (Drupal 7). API.Examplesreally neat.infoname Really Neat Moduledescription Provides a really neat page for your sitecore 7.xreally neat.module ?php/*** @file* Hook implementation and shared functions for the Really Neat Module.*//*** Implements hook menu().*/function really neat menu() { items array(); items ['really/neat'] array('title' 'A Really Neat Page','page callback' 'really neat page','access callback' TRUE, //Anyone can access.// Or replace with array([name-of-permission]),),return items;}/*** Page callback: Displays something really neat*/function really neat page() {return "Really Neat!"}custom module.infoname Custom Moduledescription Creates a block containing a custom output.core 7.xcustom module.modulehttps://riptutorial.com/ko/home22

/*** Initiates hook block info.** Registers the block with Drupal.*/function custom module block info() { blocks array();//Registers the machine name of the block. blocks['custom block'] array(//Sets the human readable, administration name.'info' t('My Custom Block'),//Tells Drupal not to cache this block.//Used if there is dynamic content.'cache' DRUPAL NO CACHE,);return blocks;}/*** Initiates hook block view().** Sets the block title and content callback.*/function custom module block view( delta '') { block array();switch ( delta) {//Must be the machine name defined in the hook block info.case 'custom block'://The blocks title. block['subject'] 'My custom block';//The string or function that will provide the content of the block. block['content'] custom module block content();break;}return block;}/*** Returns the content of the custom block.*/function custom module block content() { content "This function only returns a string, but could do anything."return content;}.,"" .drupal 'mailing list' ,API.: !forms api reference.html/7.x/function custom module form( form, & form state) { form['first name'] array (https://riptutorial.com/ko/home23

'#type' 'textfield','#title' 'First Name','#required' TRUE,); form['last name'] array ('#type' 'textfield','#title' 'Last Name','#required' TRUE,); form['email'] array ('#type' 'textfield','#title' 'First Name','#required' TRUE,);return form;}function custom module form validate( form, & form state) {if (!filter var( email, FILTER VALIDATE EMAIL)) {form set error('email', t('Please provide a valid email address.'));}}function custom module form submit( form, & form state) {//Useful function for just getting the submitted form valuesform state values clean( form state);//Save time later by assigning the form values to variables. first name form state['values']['first name']; last name form state['values']['last name']; email form state['values']['email'];//Insert the submitted data to the mailing list database table.db insert('mailing list')- fields(array('first name' first name,'last name' last name,'email' email,))- execute();//Set a thank you message.drupal set message('Thank you for subscribing to our mailing list!');//drupal goto() could be used here to redirect to another page or omitted to reload the samepage.//If used, drupal goto() must come AFTER drupal set message() for the message to bedisplayed on the new page.}custom module.infoname Custom Moduledescription Creates a block containing a custom output.core 7.xcustom module.modulehttps://riptutorial.com/ko/home24

/*** Initiates hook block info.** Registers the block with Drupal.*/function custom module block info() { blocks array();//Registers the machine name of the block. blocks['custom block'] array(//Sets the human readable, administration name.'info' t('Titania Price Widget'),//Tells Drupal not to cache this block.//Used if there is dynamic content.'cache' DRUPAL NO CACHE,);return blocks;}/*** Initiates hook block view().** Sets the block title and content callback.*/function custom module block view( delta '') { block array();switch ( delta) {//Must be the machine name defined in the hook block info.case 'custom block'://The blocks title. block['subject'] 'My custom block';//The string or function that will provide the content of the block. block['content'] custom module block content();break;}return block;}/*** Returns the content of the custom block.*/function custom module block content() { content "This function only returns a string, but could do anything."return content;}.,"" .drupal 'mailing list' ,API.: !forms api reference.html/7.x/function custom module form( form, & form state) { form['first name'] array (https://riptutorial.com/ko/home25

'#type' 'textfield','#title' 'First Name','#required' TRUE,); form['last name'] array ('#type' 'textfield','#title' 'Last Name','#required' TRUE,); form['email'] array ('#type' 'textfield','#title' 'First Name','#required' TRUE,);return form;}function custom module form validate( form, & form state) {if (!filter var( email, FILTER VALIDATE EMAIL)) {form set error('email', t('Please provide a valid email address.'));}}function custom module form submit( form, & form state) {//Useful function for just getting the submitted form valuesform state values clean( form state);//Save time later by assigning the form values to variables. first name form state['values']['first name']; last name form state['values']['last name']; email form state['values']['email'];//Insert the submitted data to the mailing list database table.db insert('mailing list')- fields(array('first name' first name,'last name' last name,'email' email,))- execute();//Set a thank you message.drupal set message('Thank you for subscribing to our mailing list!');//drupal goto() could be used here to redirect to another page or omitted to reload the samepage.//If used, drupal goto() must come AFTER drupal set message() for the message to bedisplayed on the new page.}custom module.installdrupal.Schema hook schema () .custom module.installhttps://riptutorial.com/ko/home26

/*** Installs the database schema.*/function custom module install() {drupal install schema('mailing list');}/*** Uninstalls the database schema.*/function custom module uninstall() {drupal uninstall schema('mailing list');}/*** Creates the tables using the schema API.*/function custom module schema() { schema['mailing list'] array('description' 'TODO: please describe this table!','fields' array('first name' array('description' 'TODO: please describe this field!','type' 'int','not null' TRUE,),'last name' array('description' 'TODO: please describe this field!','type' 'int','not null' TRUE,),'email' array('description' 'TODO: please describe this field!','type' 'int','not null' TRUE,),),);}- (Drupal 7) : -drupal-7-https://riptutorial.com/ko/home27

8:Views() , , , ,.ExamplesUIhttps://riptutorial.com/ko/home28

: s://riptutorial.com/ko/home29

9:Twig Drupal 8 . Drupal 8, Twig(Drupal.html.twig .html.twigDrupal.,,.html.twig.Examples(Drupal 7) PHP. ,.Twig . (Drupal 8)capitalizeTwig Drupal 8.Drupal 8twig shuffle extension. Drupal Twig.twig shuffle extension.services.yml.services:twig shuffle extension.twig extension:class: Drupal\twig shuffle extension\TwigExtension\TwigShuffleExtensiontags:- { name: twig.extension }tagsclass,(, Twig ) Drupal .// Don't forget the namespace!namespace Drupal\twig shuffle extension\TwigExtension;use Twig Extension;use Twig SimpleFilter;class TwigShuffleExtension extends Twig Extension {/*** This is the same name we used on the services.yml file*/public function getName() {return 'twig shuffle extension.twig extension';}// Basic definition of the filter. You can have multiple filters of course.// Just make sure to create a more generic class name ;)public function getFilters() {return [new Twig SimpleFilter('shuffle', [ this, 'shuffleFilter']),];}// The actual implementation of the filter.https://riptutorial.com/ko/home30

public function shuffleFilter( context) {if(is string( context)) { context str shuffle( context);}return context;}}.{{ "shuffle me!" shuffle }}Depupency Inject DrupalCSS / JavascriptTwig.SVG. Twig. CSS SVG SVG DOM .SVG.1. \Drupal::theme()- getActiveTheme()- getPath();\Drupal::theme()- getActiveTheme()- getPath();2. ThemeManager ( \Drupal::theme() ) .().twig svg extension twig svg extension.services.yml.services:twig svg extension.twig extension:class: Drupal\twig svg extension\TwigExtension\TwigSvgExtensionarguments: ['@theme.manager']tags:- { name: twig.extension }Drupalarguments.namespace Drupal\twig svg Extension\TwigExtension;use Drupal\Core\Theme\ThemeManager;use Twig Extension;use Twig SimpleFilter;class TwigSvgExtension extends Twig Extensionprivate theme;{// Dependency injection at work!public function construct(ThemeManager theme) { this- theme theme;}public function getFilters() {return ['svg' new Twig SimpleFilter('svg', [ this, 'svgFilter']),];https://riptutorial.com/ko/home31

}public function getName() {return 'twig svg extension.twig extension';}public function svgFilter(string filepath) { realpath realpath( this- theme- getActiveTheme() getPath().DIRECTORY SEPARATOR. filepath); pathinfo pathinfo( realpath);if( realpath ! false && strtolower( pathinfo['extension']) 'svg') {return file get contents( realpath);}return '"'. filepath.'" does not exist or is not an SVG';}}.svgFilter filepath.: s://riptutorial.com/ko/home32

10: - Drupal 7Examples.info.info. .info. "",."" - ( : name my theme ).Drupal. Drupal PHP.info. .infoWindows Mac TextEdit ,. example.com ex themename.info.info.Drupal.BOM (Byte Order Mark) UTF-8 .Drupal. Drupal .info. . PHP.infoname MyCompany Themedescription A Bootstrap Sub-theme.core 7.xbase theme bootstrap;;;;;;;;;;;;;;;;;;;;;;; ions[header] 'Navigation' 'Top Bar'https://riptutorial.com/ko/home33

egions[sidebar first]regions[sidebar second]regions[footer]regions[page top]regions[page bottom] ooter''Page top''Page bottom';;;;;;;;;;;;;;;;;;;;;;; MyCompany Custom Regions;;;;;;;;;;;;;;;;;;;;;regions[footer menu left] 'Footer menu left'regions[footer menu right] 'Footer menu right';;;;;;;;;;;;;;;;;;;;;;; CSS;; these css files will be included on every page;;;;;;;;;;;;;;;;;;;;;stylesheets[all][] css/bootstrap.min.cssstylesheets[all][] css/MyCompany.css;;;;;;;;;;;;;;;;;;;;;;; JS;; this JS file will be included on every page;;;;;;;;;;;;;;;;;;;;;scripts[] js/MyCompany.min.js- Drupal 7 : rupal-7https://riptutorial.com/ko/home34

eld type ntssettingsForm #default value.module.hook themefunction obfuscator field formatter theme() {return ['obfuscator field formatter' ['variables' array('title' NULL, 'url' NULL),'template' or-field-formatter.twig.html. render #title#url.Examples. @ . . @ () . ,.obfuscator field formatter.namespace Drupal\obfuscator field formatter\Plugin\Field\FieldFormatter;use Drupal\Core\Field\FieldDefinitionInterface;use Drupal\Core\Field\FieldItemInterface;use iptutorial.com/ko/home35

use Drupal\Core\Field\FormatterBase;use Drupal\Core\Form\FormStateInterface;/*** Plugin implementation of the 'example field formatter' formatter.** @FieldFormatter(*id

1: drupal Drupal PHP . Drupal . Drupal . Drupal : 7 8 . Drupal 8 Symfony . Examples Drushal Drupal