Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 40 min 12 sec ago

IXIS: Nippy EdgeCast Purging

Wed, 07/16/2014 - 11:27
div class=field field-type-filefield field-field-blogimage div class=field-items div class=field-item odd img src=http://www.ixis.co.uk/sites/ixis/files/imagecache/blogfull/ec_ser_caching.png alt=teaser image for blog post title=Edgecast caching from Verizon class=imagecache imagecache-blogfull imagecache-default imagecache-blogfull_default width=435 height=181 / /div /div /div pSince we integrated the a href=http://www.edgecast.com/services/content-delivery/EdgeCast CDN/a for one of our clients, and released a related a href=https://www.drupal.org/project/edgecastEdgeCast Drupal module/a we have been encouraging more and more clients to consider a CDN layer to accelerate performance to multiple geographicnbsp;locations and maintain an excellent uptime even during site maintenance periods./p pA recent international client who is running many domains with federated content using the Domain module needed to make use of the content delivery network to improve performance and resiliance for their sites./ppa href=http://www.ixis.co.uk/blog/nippy-edgecast-purging target=_blankread more/a/p

Acquia: 5 Erreurs à éviter sur votre Site Drupal - Numéro 4: L'Infrastructure

Wed, 07/16/2014 - 11:14
div class=field field-name-body field-type-text-with-summary field-label-hidden div class=field-items div property=content:encoded class=field-item evenpimg src=/sites/default/files/lg-ravi-sarma-brooklyn-bridge-ccby2.0.jpg alt=Photo by Ravi Sarma - Brooklyn Bridge, CC BY 2.0 //p/div /div /div span property=dc:title content=5 Erreurs à éviter sur votre Site Drupal - Numéro 4: L#039;Infrastructure class=rdf-meta/span

Mogdesign: #D8Rules As a Proof that Drupal Community Is a Living Cell

Wed, 07/16/2014 - 11:03
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpWhen a href=http://d8rules.org/ target=_blankD8Rules/a project waiting in a Funding phase had just seven days left to be successfully funded, success didn’t seem likely. The project had raised just over 40% of its funding goal so far. The days shortened; the pressure rose./p/div/div/div

Acquia: Deliver digital faster with Drupal – Part 2

Tue, 07/15/2014 - 15:45
div class=field field-name-body field-type-text-with-summary field-label-hidden div class=field-items div property=content:encoded class=field-item evenp In a href=/blog/deliver-digital-faster-drupal-part-1Deliver digital faster with Drupal Part 1/a, I showed you some of the many examples of successful sites built rapidly thanks to Drupal’s modularity. To stay ahead of your competition, you need to be nimble and agile; Drupal helps you do this with reusable, transferable digital experiences that can be customised to suit various niches even within a single business enterprise. All, of course, without paying additional license fees or mandated limits on developers, environments, or copies. /p/div /div /div span property=dc:title content=Deliver digital faster with Drupal – Part 2 class=rdf-meta/span

Liran Tal's Enginx: Migrate Drupal 7 to WordPress 3.9 – The Conclusion

Tue, 07/15/2014 - 15:35
div class=seriesmetaThis entry is part 2 of 2 in the series a href=http://enginx.com/series/drupal-7-to-wordpress-3-9-migration/ class=series-38 title=Drupal 7 to Wordpress 3.9 MigrationDrupal 7 to Wordpress 3.9 Migration/a/divpMigrate Drupal 7 to WordPress 3.9  - To recap, in a previous post on this series, I#8217;ve set the background for my action to migrate  from Drupal 7 to WordPress 3.9. In this post, we will explore the process of making this migration happen./p pIf you#8217;ve been on this search before to migrate from Drupal to WordPress, then you#8217;ve realized that there aren#8217;t a lot of resources, and that you may have some preferences in regards to the migration process. Some solutions that popped a href=https://wordpress.org/plugins/cms2cms-automated-drupal-to-wp-migration/required to have both instances of Drupal and WordPress up and running/a for some reason, but that didn#8217;t fit my requirements as I wanted to use the same domain and not needing to setup another one just for the migration process. Other solutions are of course a href=http://migratetowp.com/service-overview/professional support services/a which will perform the migration for you, but you#8217;d have to say goodbye to a few hundred dollars to begin with (prices range from $750 to $3500 for a website migration)/p pFinding Drupal2Worpdress provided me a good start to get things rolling. As with most things on Github for me, I usually begin by forking a repository and a href=https://github.com/lirantal/Drupal2Wordpress/Drupal2Wordpress/a was no exception. Quickly after I reviewed the code in the original repository I found out that the script is very small and focused, without requiring any special dependencies or extra configuration which was my primary goal #8211; finding the most simple solution as possible. Now I#8217;m ready to take a stub at it./p pnbsp;/p pbMy Video Course - a href=https://www.udemy.com/step-by-step-drupal-7-to-wordpress-39-migration/ target=_blankStep by Step Drupal 7 to WordPress 3.9 Migration/a/b/p pI created a Video course on a title=Udemy href=http://www.udemy.com target=_blankUdemy.com /ato teach you the skills of migrating Drupal 7 to WordPress 3.9./p pI#8217;d appreciate if you leave a review after taking the quick course/p div id=attachment_461 style=width: 521px class=wp-caption aligncentera href=https://www.udemy.com/step-by-step-drupal-7-to-wordpress-39-migration/img class=wp-image-461 size-full src=http://enginx.com/wp-content/uploads/2014/07/Drupal7MigrationToWordpress.png alt=Step-by-Step Drupal 7 to WordPress 3.9 Migration Learn how to migrate your content, users, and more from a Drupal 7 website to WordPress 3.9. By the end of this course, you will be able to migrate any Drupal 7 website to a WordPress 3.9 installation. Moreover, you will have an overall understanding of the differences between Drupal and WordPress table schema to estimate the migrated content scope. Includes a step-by-step video tutorial of how to migrate a Drupal website to WordPress. Includes a review of Drupal and WordPress database schema to understand migration effort and complexity. Enrich your skill-set with this knowledge and extend your WordPress consultancy reach width=511 height=411 //ap class=wp-caption-textStep-by-Step Drupal 7 to WordPress 3.9 Migration Learn how to migrate your content, users, and more from a Drupal 7 website to WordPress 3.9./p/div pnbsp;/p pnbsp;/p pnbsp;/p pa href=http://enginx.com/wp-content/uploads/2014/05/drupal_7_to_wordpress3.9.jpgimg class=alignleft size-medium wp-image-334 src=http://enginx.com/wp-content/uploads/2014/05/drupal_7_to_wordpress3.9-300x160.jpg alt=drupal_7_to_wordpress3.9 width=300 height=160 //a/p h2Getting to Business with Drupal2Wordpress/h2 pa href=https://github.com/lirantal/Drupal2Wordpress/Drupal2Wordpress/a is essentially very simple. It only requires to edit the PHP code at the beginning, and set the connection information correctly for both WordPress and Drupal database. That already implies on the characteristics of this migration tool #8211; it expects that both instances of Drupal and WordPress are available through a database connection and since this tool has to be accessible and run on the hosting account service  and be triggered from the web or from a cron job (because hosting accounts do not open their database servers to the public)./p pSome of my fixes to this tool began with a href=https://github.com/lirantal/Drupal2Wordpress/commit/d3c104cc836fe4f0feee3463def0d388e8bb5a9eimporting/a any content type from Drupal, yet making sure they are imported into WordPress as eligble posts content type (as opposed to pages for example, which aren#8217;t blog related). URL aliasing has also been a href=https://github.com/lirantal/Drupal2Wordpress/commit/2083571f87368559dd707af2391335030d1ab6aefixed/a so that imported posts in the new WordPress install are just working good, as well as another a href=https://github.com/lirantal/Drupal2Wordpress/commit/1c797ff252a26cc619c171467f4520d2eea249dafix to migrate only approved comments/a. New additions to the tool included the a href=https://github.com/lirantal/Drupal2Wordpress/commit/8bc6e4f9c1ea16dafe81bbfa9be552f746649dedsupport for migrating users/a, and adding a default #8216;Blog#8217; category on WordPress and relating all posts to it (as otherwise they are not displayed)./p pThe tool has been tested and it only requires to get a fresh installation of WordPress 3.9 to migrate any Drupal 7 site to it. You#8217;re welcome to fork out the repository or test it and comment so we can further improve upon it./p pa href=https://github.com/lirantal/Drupal2WordpressDrupal2Wordpress/a #8211; the Github repository./p pnbsp;/p !-- Easy AdSense V7.21 -- !-- [leadout: 2 urCount: 1 urMax: 0] -- div class=ezAdsense adsense adsense-leadout style=text-align:center;margin:12px; script async src=//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js/script !-- enginx-blog-wide-post -- ins class=adsbygoogle style=display:inline-block;width:728px;height:90px data-ad-client=ca-pub-9677997565991773 data-ad-slot=6746030703/ins script (adsbygoogle = window.adsbygoogle || []).push({}); /script/div !-- Easy AdSense V7.21 -- pThe post a rel=nofollow href=http://enginx.com/blog/migrate-drupal-7-to-wordpress-3-9-conclusion/Migrate Drupal 7 to WordPress 3.9 #8211; The Conclusion/a appeared first on a rel=nofollow href=http://enginx.comLiran Tal#039;s Enginx/a./p

Drupalize.Me: Drupal 8 Plugins Explained

Tue, 07/15/2014 - 15:00
div class=field field-name-body field-type-text-with-summary field-label-hidden text-content text-secondarydiv class=field-itemsdiv class=field-item evenpAs you start down the road of learning Drupal 8 module development, one of the first new Drupalisms that you're likely to encounter are plugins. After writing a blog post about creating blocks, which uses the new plugin architecture, I thought it might be interesting to take a step back and talk a little bit more about plugins at a higher level. This blog post contains an introduction to the what and why of plugins to help Drupal 7 developers make the transition to Drupal 8./p /div/div/div

Nuvole: Packaging and reusing configuration in Drupal 8

Tue, 07/15/2014 - 15:00
div class=field field-name-field-blog-subtitle field-type-text-long field-label-hiddendiv class=field-itemsdiv class=field-item evenBringing quot;reusable featuresquot; to Drupal 8./div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpemThis is a preview of Nuvole's training at DrupalCon Amsterdam: a href=https://amsterdam2014.drupal.org/node/2808An Effective Development Workflow in Drupal 8/a./em/p pConfiguration Management in Drupal 8 elegantly solves staging configuration between different environments addressing an issue that is still haunting even the most experienced Drupal 7 developer. In earlier posts we covered a href=http://nuvole.org/blog/2014/jun/06/configuration-management-drupal-7-drupal-8the new Configuration Management in Drupal 8/a, seeing how it compares to Drupal 7 and Features, and even investigated a href=http://nuvole.org/blog/2013/sep/03/configuration-management-and-features-look-drupal-8how to manually simulate Features/a in Drupal 8 last year. Recent developments and contrib modules can take us several steps closer./p pConfiguration Management can get quite streamlined when using Git and a href=https://github.com/drush-ops/drushDrush 7/a as explained below./p pstrongStep 1: Move staging configuration directory into a versionable location/strong/p pBy default Drupal 8 will place the staging directory under codesites/default/files/code and it is considered a good practice to not version that location, but an alternative location can easily be specified in our codesettings.php/code:/p div class=codeblockcodespan style=color: #000000span style=color: #0000BBlt;?phpbr /$config_directories/spanspan style=color: #007700[/spanspan style=color: #DD0000'staging'/spanspan style=color: #007700] = /spanspan style=color: #DD0000'config/staging'/spanspan style=color: #007700;br //spanspan style=color: #0000BB?gt;/span/span/code/div pDone that, we must rebuild the Drupal cache:/p div class=codeblockcode$ drush cache-rebuild /code/div pstrongStep 2: Export active configuration into staging directory via Drush/strong/p pThe Configuration Management system exposes a set of very handy Drush commands: in order to “dump” all active configuration into our newly set staging directory we can just run:/p div class=codeblockcode$ drush config-exportbr /The current contents of your export directory (config/staging) will be deleted. (y/n): ybr /Configuration successfully exported to config/staging.                                                     /code/div pstrongStep 3: Push configuration changes and import it on the staging environment/strong/p pSince the staging directory is under version control we can simply git-add all its content and push it to the remote repository. After having set-up the staging environment as an exact replica of our development environment (this is actually required for the configuration staging to work) we can start profiting from the new Drupal 8 CM system. Imagine we have changed the site name on dev, after having exported, committed and pushed that change, on the staging site we will simply run:/p div class=codeblockcode$ git pullbr /br /$ drush config-importbr /br /Config               Operation                br /system.site          updatebr /Import the listed configuration changes? (y/n): ybr /The configuration was imported successfully. /code/div pFor a more comprehensive overview of the Configuration Management system please refer to our previous blog post a href=http://nuvole.org/blog/2014/jun/06/configuration-management-drupal-7-drupal-8Configuration Management: Drupal 7 to Drupal 8/a./p h3Packaging configuration/h3 pFor those developers familiar with a href=http://nuvole.org/blog/code-driven-developmentcode-driven development practices/a the three steps above might resemble what the Features module does in Drupal 7 with its codefeatures-update/code and codefeatures-revert/code Drush commands./p pWhile Drupal 8 configuration staging capabilities are far more advanced than what Features could possibly provide, what the new Configuration Management system really lacks is the ability to package configuration./p h3Enter the Configuration development module/h3 pThe a href=https://www.drupal.org/project/config_develConfiguration development/a module, currently maintained by a href=https://www.drupal.org/u/chxchx/a, serves two main purposes:/p ulliIt automates the import of specified configuration files into the active storage. /li liIt automates the export of specified configuration objects into files./li /ulpThe module offers a simple, global UI interface where a Drupal developer can set which configuration is automatically exported and imported any time they hit the “Save” button on a configuration setting page./p pIn order to achieve a more modular configuration packaging it would be enough to set a specific module’s codeconfig/install/code directory as the actual export destination./p pNuvole a href=https://www.drupal.org/node/2300717contributed a patch/a to make that possible: instead of firing an auto-export every time a “Save” button is clicked the developer can, instead, specify in the module’s info file which configuration needs to be written back to that module’s install directory and run a simple Drush command to do that./p h3Reusable “features” in Drupal 8/h3 pOne of the main advantages of having a standardized way of dealing with configuration means that modules can now stage configuration at installation time. In a way that’s something very close to what Features allowed us to do in Drupal 7./p pSay we have our news section up and running on the site we are currently working on and we would like to package it into a custom module, together with some other custom code, and ship it over a new project. The patched Config development module will help us to do just that! Here it is how:/p pstrongStep 1: Download, patch and enable Configuration development module/strong/p pWe need to download and enable the Configuration development module strongversion 8.x-1.x-dev/strong and apply the patch attached to a href=https://www.drupal.org/node/2300717#comment-8955737this Drupal.org issue/a./p pAfter rebuilding the cache, we will have the codeconfig-writeback/code Drush command available. Let's have a closer look at what it is meant to do:/p div class=codeblockcode$ drush help config-writebackbr /br /Write back configuration to a module's config/install directory. State which configuration settings you want to export in the module's info file by listing them under 'config_devel', as shown below:br /br /config_devel:br /  - entity.view_display.node.article.defaultbr /  - entity.view_display.node.article.teaserbr /  - field.instance.node.article.bodybr /br /br /Examples:br / drush config-writeback MODULE_NAME        Write back configuration to the specified module, based on .info file.br /br /Arguments:br / module                                    Module machine name.br /br /Aliases: cwb/code/div pstrongStep 2: Find what configuration needs to be packaged/strong/p pWe now look for all configuration related to our site’s news section. In Drupal 8 most of the site configuration is namespaced with related components so, if we keep on using consistent naming conventions, we can easily list all news-related configuration by simply running:/p div class=codeblockcode$ drush config-list | grep newsbr /br /entity.form_display.node.news.defaultbr /entity.view_display.node.news.defaultbr /entity.view_display.node.news.teaserbr /field.instance.node.news.bodybr /image.style.news_mediumbr /menu.entity.node.newsbr /node.type.news/code/div pstrongStep 3: Package configuration/strong/p pTo package all the settings above we will create a module called codecustom_news/code and, in its info file, we will specify all the settings we want to export, listing them under the codeconfig_devel:/code directive, as follows:/p div class=codeblockcode$ cat modules/custom_news/custom_news.info.yml br /br /name: Custom Newsbr /type: modulebr /description: 'Custom news module.'br /package: Custombr /core: 8.xbr /config_devel:br /  - entity.form_display.node.news.defaultbr /  - entity.view_display.node.news.defaultbr /  - entity.view_display.node.news.teaserbr /  - field.instance.node.news.bodybr /  - image.style.news_mediumbr /  - menu.entity.node.newsbr /  - node.type.news/code/div pAfter enabling the module we will run:/p div class=codeblockcode$ drush config-writeback custom_news/code/div pAnd we will have all our settings exported into the module’s install directory:/p div class=codeblockcode$ tree -L 3 modules/custom_news/br /br /modules/custom_news/br /├── configbr /│   └── installbr /│       ├── entity.view_display.node.news.default.ymlbr /│       ├── entity.view_display.node.news.teaser.ymlbr /│       ├── field.instance.node.news.body.ymlbr /│       ├── image.style.news_medium.ymlbr /│       ├── menu.entity.node.news.ymlbr /│       └── node.type.news.ymlbr /└── custom_news.info.yml/code/div pThe Drush command above takes care of clearing all sensitive UUID values making sure that the module will stage the exported configuration cleanly, once enabled on a new Drupal 8 site./p pTo get the news section on another site we will just copy the module to the new site's code./modules//code directory and enable it:/p div class=codeblockcode$ drush en custom_newsbr /br /The following extensions will be enabled: custom_newsbr /Do you really want to continue? (y/n): ybr /custom_news was enabled successfully.      /code/div h3Final evaluation: Drupal 7 versus Drupal 8/h3 pOne of the main differences between working in Drupal 7 and in Drupal 8 is represented by the new Configuration Management system./p pWhile Features was proposing a one-stop solution for both configuration staging and packaging, Drupal 8 CM does a better job in keeping them separate, allowing developers in taking a greater control over these two different and, at the same time, complementary aspect of a solid Drupal development workflow./p pBy using the method described above we can upgrade our comparison table between Drupal 7 and Drupal 8 introduced in a href=http://nuvole.org/blog/2014/jun/06/configuration-management-drupal-7-drupal-8one of our previous posts/a as follows:/p table class=table table-striped table-borderedtrthFunctionality/th thD7 Core/th thD7 Core + Features/th thD8 Core (current)/th thD8 Core (current) + Patched Config Devel/th /trtrtdExport full site config (no content)/td td class=text-error text-centerbNO/b/td td class=text-error text-centerbNO/b/td td class=text-success text-centerbYES/b/td td class=text-success text-centerbYES/b/td /trtrtdExport selected config items/td td class=text-error text-centerbNO/b/td td class=text-success text-centerbYES/b/td td class=text-success text-centerbYES/b/td td class=text-success text-centerbYES/b/td /trtrtdTrack config changes (full site)/td td class=text-error text-centerbNO/b/td td class=text-error text-centerbNO/b/td td class=text-success text-centerbYES/b/td td class=text-success text-centerbYES/b/td /trtrtdTrack config changes (selected items)/td td class=text-error text-centerbNO/b/td td class=text-success text-centerbYES/b/td td class=text-success text-centerbYES/b/td td class=text-success text-centerbYES/b/td /trtrtdStage configuration/td td class=text-error text-centerbNO/b/td td class=text-success text-centerbYES/b/td td class=text-success text-centerbYES/b/td td class=text-success text-centerbYES/b/td /trtrtdPackage configuration/td td class=text-error text-centerbNO/b/td td class=text-success text-centerbYES/b/td td class=text-error text-centerbNO/b/td td class=text-success text-centerbYES/b/td /trtrtdReuse configuration in other projects/td td class=text-error text-centerbNO/b/td td class=text-success text-centerbYES/b/td td class=text-error text-centerbNO/b/td td class=text-success text-centerbYES/b/td /trtrtdCollaborate on the same project/td td class=text-error text-centerbNO/b/td td class=text-success text-centerbYES/b/td td class=text-error text-centerbNO/b/td td class=text-error text-centerbNO/b/td /tr/tablepThe last NO deserves a brief explanation: Configuration Management allows two developers to work simultaneously on different parts of the same project if they are very careful: but merging the work would have to be done by version control (GIT or similar), that doesn't know about YAML or Drupal./p h3Some open issues/h3 pContributed modules seem to be the best way to enhance the core Configuration Management system, much like what happened with Drupal 7 and Features. There are still several issues that should be considered for an optimal workflow, to match and improve what we already have in Drupal 7:/p ullistrongPiping/strong: the ability to relate configuration components based on both hard and logic dependencies, for example: I export a content type and, automatically, I get also its fields. If piping might have been too rigid, at times, it would be still useful to have in some configurable form./li listrongEnhanced configuration diff/strong: it might be useful to have the possibility to review what configuration is going to be installed before enabling a module, like it is now when importing staged configuration to the active storage./li listrongGranularity/strong: it is still impossible to export part of a configuration file, so we still depend on the core conventions for grouping configuration into files, and we can't export a single permission for example./li listrongOwnership/strong: we can't know if another module (or feature) is tracking a component we wish to track; this could be useful in the perspective of maintaining several modular features./li listrongUpdates/strong: we can reuse configuration by simply enabling a module, but this holds only for the initial installation; after a module is enabled, we don't have a clean way to import changes (say, to upgrade to a newer version of the feature) outside the standard workflow foreseen in Configuration Management./li /ul/div/div/divdiv class=field field-name-field-blog-tags field-type-taxonomy-term-reference field-label-inline clearfixdiv class=field-labelTags:nbsp;/divdiv class=field-itemsdiv class=field-item evenDrupal 8, Drupal Planet, DrupalCon, Drush, Code Driven Development/div/div/divdiv class=field field-name-field-blog-image field-type-image field-label-abovediv class=field-labelImage:nbsp;/divdiv class=field-itemsdiv class=field-item evenimg src=http://nuvole.org/sites/default/files/default_images/nuvole-square-logo.png alt= //div/div/div

Kristian Polso: Password protect your Drupal site with Shield-module

Tue, 07/15/2014 - 09:26
From time to time, there might arise a situation where you want to password protect your Drupal site. Maybe the site is under development, or you just want it to be available to a selection of users. This is usually done with something called HTTP Basic Auth, which allows you to password protect a site. This can be done in Apache by modifying the .htaccess file.  There are some great tutorials on how to do this, but this is not the correct way of doing it for couple of reasons.

DrupalCon Amsterdam: Come for the Con, stay for the sprints! Plan your travel for weekend and Friday sprints in Amsterdam

Tue, 07/15/2014 - 08:10
div class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpa href=https://amsterdam2014.drupal.org/sprints target=”_blank”Sprints/a are an important part of DrupalCon you will want to experience. Arrange your travel and hotel to take advantage of the extended sprints before DrupalCon on 27-28 September, the big sprint day on Friday, 3 October, and the extended sprints after DrupalCon on 4-5 October. /p h3Stay for the sprints on Friday/h3 pEvery DrupalCon, we cap off the week with a full day of Drupal sprints. DrupalCon Amsterdam's sprint day is Friday, 3 October, starting at 9:00 and going until 18:00. You will not want to leave early and miss any of it. So, book your departure very very late Friday, or even better, Saturday or Sunday! /p pWhether you are a site builder, designer, programmer, themer, technical writer, project manager, or usability specialist, if you have Drupal experience, this is your chance to contribute back to the Drupal community, meet other Drupal enthusiasts and interact with them building the future of Drupal. /p h3Something for everyone/h3 pThe sprint on Friday will include three separate events:/p p1. a href=https://amsterdam2014.drupal.org/first-time-sprinter-workshop target=”_blank”First-Time Sprinter Workshop/abr / If you're new to Drupal contribution, you can attend the a href=https://amsterdam2014.drupal.org/first-time-sprinter-workshop target=”_blank”FREE mentored workshop/a on Friday from 9-noon. The hands-on workshop will cover the basics of contribution essentials like the Drupal.org issue queues, IRC, git, and optionally setting up Drupal 8 on your laptop./p p2. a href=https://amsterdam2014.drupal.org/mentored-core-sprint target=_blankMentored Core Sprint/abr / If you are already have all the tools, have used the issue queue, have a working Drupal 8 development environment on your laptop, would like to work with a mentor to contribute to Drupal core, and would like help finding an issue to work on, or if you're not quite sure where to start contributing, come to the a href=https://amsterdam2014.drupal.org/mentored-core-sprint target=”_blank”Mentored Core Sprint/a. This sprint will run all day, with First-Time sprinter workshop attendees joining in the afternoon. /p pSprint mentors will help you find a task for a Drupal core issue and then help you work on it. You can create patches for bugs, add documentation to issues, test patches, and more!/p pTo get a head start, a href=https://drupal.org/toolsset up your Drupal 8 development environment/a before Friday. Attend the a href=https://drupal.org/core-mentoring target=”_blank”core office hours/a from home. Or, at the conference, we will have plenty of opportunities to help get you set up at any of our Get Involved BOFs (times and locations TBD), or you can come to the a href=https://amsterdam2014.drupal.org/first-time-sprinter-workshop target=”_blank”First-Time Sprinter Workshop/a Friday morning. /p p3. All the Sprints!br / If you're an experienced Drupal contributor, you can head straight to one of the many other a href=https://amsterdam2014.drupal.org/add-your-sprints target=”_blank”share your sprint initiative/a to do focused work on one particular area of Drupal, like Views, the Drupal 8 multilingual initiative, the Twig theming system, Migrate, Drupal.org, and more. /p pYou will work directly with initiative leads and collaborate on issues. This is a great opportunity to make a difference for the Drupal project AND learn from peers how to solve problems! /p h3Mentor new contributors/h3 pAre you already familiar with setting up a development environment or with the core contribution process? Want to help other contributors? We need about 35 mentors to work with our first-time contributors. Sign up early and secure your mentor t-shirt in the size of your choice./p pa href=https://amsterdam2014.drupal.org/sign-up-to-mentor target=”_blank” class=button-linkSign up to help mentor/a/p pWant to mentor, but also want to sprint yourself? Extended sprints to the rescue!/p h3Extended Sprints are 27-28 September and 4-5 October/h3 pTake advantage of being able to work with others from around the world with extra days: extended sprint days! a href=https://groups.drupal.org/node/427578 target=”_blank”Read more details and sign up/a for extended sprints so we can make sure we have enough resources and room for you! We'll be sprinting around the clock at the Berlage in the heart of Amsterdam and seeing the sights and enjoying the city's great pubs and restaurants during breaks. /p h3Make a difference/h3 pDrupalCon sprints are critically important to pushing the Drupal project forward, and are also a great opportunity to give back alongside the people who help bring the code to life. Join us DrupalCon Amsterdam and help make an impact! /p h3Sponsor opportunities available/h3 pFriday sprints are sponsored by Werk21, extended sprint venue, coffee and catering thanks to the a href=https://association.drupal.org/ target=”_blank”Drupal Association/a, a href=http://www.largescaledrupal.com/ target=”_blankAcquia Large Scale Drupal/aa/a, a href=http://www.open8.se/ target=”_blank”Open8/a, and … YOU?/p pa href=mailto:sponsor@association.drupal.orgContact us/a for more information or to sponsor./p p--br / Cathy Theys (a href=https://www.drupal.org/u/yesctYesCT/a)br / DrupalCon Amsterdam sprint lead/p /div/div/div

NEWMEDIA: Drupal PCI Compliance White Paper: Version 1.1 Released!

Tue, 07/15/2014 - 05:20
span class=field field-node--title field-name-title field-type-text field-label-hidden data-edit-field-id=node/124/title/en/rssDrupal PCI Compliance White Paper: Version 1.1 Released!/spandiv class=field field-node--field-intro field-name-field-intro field-type-text-long field-label-hidden data-edit-field-id=node/124/field_intro/en/rssdiv class=field-itemsdiv class=field-itemVersion 3.0 of the PCI compliance standard becomes mandatory on January 1st, 2015 and will be a complete game changer for most Drupal eCommerce sites.Are you ready to meet the challenge?/div/div/divdiv class=field field-node--body field-name-body field-type-text-with-summary field-label-hidden data-edit-field-id=node/124/body/en/rssdiv class=field-itemsdiv class=field-itempemFor those wanting to dive right in, simply click a href=http://drupalpcicompliance.org/files/DrupalPCICompliance.pdfthis link/a to download the white paper./em/p pMatt Kleve was spot on in his DrupalCon Denver 2013 presentation title a href=http://denver2012.drupal.org/program/sessions/pci-four-letter-word-e-commercePCI: a Four-Letter Word of eCommerce/a. Whenever I present on or discuss the subject matter with other members of the community, there is usually some level of disdain for the payment card industry (PCI) for creating the data security standard (DSS) that we all commonly know as PCI compliance. The complaints are many:/p ul liIt#39;s too confusing./li liIt#39;s too difficult./li liIt#39;s too expensive to deal with./li liIt#39;s security theater./li liIt doesn#39;t guarantee you#39;ll never get hacked./li /ul pOnce everyone has finished airing their grievances, there is always the unspoken question that you can see on everyone#39;s face... Can#39;t we just ignore this little nuisance of a requirement and get back to processing credit card transactions?/p pThe reality is that we cannot pretend PCI compliance doesn#39;t exist. The growth of the eCommerce market can only continue as long as users trust the process, and that can only happen if the end-to-end process remains secure. Ohmdash;and any merchant agreement you sign will stipulate PCI compliance as a requirement (make sure to read all that fine print!). Therefore, if you want to accept credit or debit cards payments online (even through 3rd party) then you really have no other choice. Compliance is mandatory./p pThat#39;s the bad news. The good news is that understanding where and how to get started for a Drupal site is much easier as a result of the a href=http://drupalpcicompliance.org/Drupal PCI Compliance White Paper/a that was initially published a year ago (and a HUGE thanks to the a href=http://drupalpcicompliance.org/sponsors/many sponsors/a that helped make that happen). It#39;s readable within an hour and can help everyone involved on a Drupal project make informed decisions and reduce their risk as much as possible./p h3The Standard Gets Stronger/h3 pAs the volume of eCommerce transactions continues to grows, it becomes even more important to protect every component in the entire system handling the transaction. After all, a single point of failure was responsible for a href=http://www.businessweek.com/articles/2014-03-13/target-missed-alarms-in-epic-hack-of-credit-card-dataTarget debacle/a, where the credit card records of 40+ million customers were compromised. This resulted in a huge financial loss for the company as well as a PR nightmare to deal with./p pTo minimize these types of attacks from growing in size and frequency, the security standard must keep up. The latest update to the PCC-DSS (version 3.0) was published in November, 2013 and will become mandatory of all eCommerce sites on January 1st, 2015./p h3What PCI-DSS 3.0 Means for Drupal/h3 pIt#39;s hard to understate the impact this will have on the Drupal community. In version 1.0 of the standard, there was a there was a very easy way out. Simply redirect the user to a hosted payment page on PayPal or Authorize.Net and you could outsource almost all of your responsibilities. This became the goto solution for many budget conscious eCommerce websites./p pVersion 2.0 of the standard introduced a gray area. The PCI council created a a href=http://goo.gl/R21rwsupplemental guide/a that stated the hosted payment pages, direct post, and iframe solutions all had vulnerabilities. Despite disclosing these attack vectors, the PCI council didn#39;t directly come out and state that they must now meet a larger set of security controls. This didn#39;t stop certain vendors (notably Braintree) from promising compliance within 15 minutes. The dilemma for someone interpreting version 2.0 of the standard was obvious: if there were ways to break in and steal cards, wouldn#39;t that require one to fully lock down the LAMP stack and Drupal application layer? This gray area only led to additional confusion among the Drupal community, who (as a whole) simply opted for the easy route interpretation of the standard./p pVersion 3.0 ended the confusion entirely. Now hosted payment pages and direct post solutions fall into a new category (SAQ A-EP), which includes over 139 security controls that cover everything from anti-virus to password policy requirements. What used to be trivial (SAQ A) for most websites to achieve has become very challenging. No longer are shared hosting solutions viable. No longer can a website lag behind on updating Drupal core and contrib modules when security updates are available. No longer is it acceptable to enable php filter, allow authenticated users to use the full HTML filter, or manage a site through a shared FTP login./p pIn short, this is a big damn deal for the Drupal eCommerce community. Without readily available quot;turnkeyquot; solutions (such as PCI Level 1 managed hosting), many smaller eCommerce sites may not be able to meet the requirements and may be forced to seek non-Drupal based alternatives. In fact, the cost of achieving and maintaining SAQ A-EP could easily fall within the $10,000-$100,000 price range, which is likely to exceed the entire budget of most Drupal eCommerce sites!/p h3Learning More/h3 pCovering all the ins and outs of PCI compliance is difficult to do in a single blog post (trust me, I tried with the excessively long article titled a href=http://soundpostmedia.com/article/lets-talk-about-pci-compliance-ubercart-and-drupal-commerce/Let#39;s Talk About PCI Compliance for Ubercart and Drupal Commerce/a. Therefore, I#39;ll close with this final recommendation (or plea): if you build, maintain, operate, or own an eCommerce website, then you should absolutely read the new version of the a href=http://drupalpcicompliance.org/Drupal PCI Compliance White Paper/a. And if you have any comments, questions, or concerns, please submit an issue in the a href=https://github.com/rickmanelius/drupalpcicompliance/issuesgithub issue queue/a./p /div/div/div

PreviousNext: Using Mink for web testing

Tue, 07/15/2014 - 01:00
div class=field field-name-field-summary field-type-text-long field-label-hiddendiv class=field-itemsdiv class=field-item even pPreviousNext have been using Behat to test Drupal 7 sites for some time now. More recently, there has been a big push to introduce Behat tests in Drupal 8. So what is it all about?/p pIn this post, I'll be taking a look at the Mink layer behind Behat and using it for web scraping and functional testing and what this means for the future of Drupal testing./p /div/div/divspan property=dc:title content=Using Mink for web testing class=rdf-meta/span

Károly Négyesi: Drupal 8 progress from my / MongoDB perspective: update #27

Tue, 07/15/2014 - 00:53
pThere hasn't been an update for some time now; things have quieted down a bit, I am mostly just writing drivers now (and coach people on migrate). MongoDB module caught up with the latest config changes and so the module works again. Migrate bugfixing moves along steadily with more and more people actually trying it and fixing bugs, hurray! Blocks now get placed more sensibly, there's steady progress on a href=https://www.drupal.org/node/2262275D6-D8 CCK Single On/Off Checkbox, Checkboxes/Radio buttons, and Select formatters/a, also node authors in more interesting cases are broken (In Drupal 6, the node.uid and the node_revision.uid can be different). The first step for a href=https://www.drupal.org/node/2202511migration groups/a is ready. This is the stepping stone for Drupal 7 migrations because quite a few migration will need to be in both the Drupal 6 and the Drupal 7 group. It is also quite important for contrib -- now contrib will be able to just add in a migration YAML that this migration belongs to the Drupal 6 group and it'll run along with core, as easy as that./p pOur favorite meta issue a href=https://drupal.org/node/2068325convert SQL queries to entitity queries/a issue is almost finished, opens the door for multilingual / performance enhancements and of course MongoDB :) /p pI have discussed with Crell how to a href=https://www.drupal.org/node/2302617define a standard mechanism for backend-aware service overrides/a. As usual, this is good for core because it allows MySQL and PostgreSQL specific drivers but also at the same time it will help MongoDB as well: currently the MongoDB module handles the service overrides but it's an all-or-nothing thing. With this issue, you'll be able to mix various storage backends as you want in a standard fashion./p pFinally, even if it's not directly MongoDB related, the issue to switch on twig autoescape is almost done too -- this will make Drupal 8 more secure, even custom modules and custom themes will be easier to write in a secure fashion. Hopefully this will make Drupal 8 an even more appealing offer./p

Drupal Association News: Drupal Association Board Meeting Summary

Tue, 07/15/2014 - 00:22
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpimg alt= src=https://assoc.drupal.org/files/14392115861_e50e795197_m.jpg style=width: 240px; height: 160px; border-width: 0px; border-style: solid; margin: 10px; float: left; /We held our July Drupal Association Board Meeting last Wednesday. Halfway through the year, we took the opportunity to review our metrics for the year thus far, discuss some possible changes to our governance model, and tackle a couple of housekeeping issues in executive session. If you somehow managed to miss us during the live session, never fear! We've got a a href=http://youtu.be/zCm5cjrzpf0recording/a, the meeting a href=https://drive.google.com/a/association.drupal.org/?tab=co#folders/0B8gZDNT4xrvZcXllZUx1Y3BVR0Umaterials/a, and the a href=https://docs.google.com/a/association.drupal.org/document/d/1gg663QuLHsZsXeYN2kbQXjEbCnQBdYpMiXccqNIOoYY/edit#heading=h.7bwykkkzfb8tminutes/a available for your perusal, as well as this summary:/p h3 DrupalCons/h3 pDrupalCon Austin is now behind us, but it's not forgotten! We're thrilled to have helped host an event that was so successful in so many ways. We were able to beat our Portland attendance numbers, though we did fail to meet our stretch goal of 4,000 attendees. At this point, we are sifting through all the registration, financials, and evaluation data to pull together a summary report (with comparisons to Portland) for the August board meeting./p pNext up is a href=https://amsterdam2014.drupal.org/DrupalCon Amsterdam/a. Registration for Amsterdam is strong and we're particularly excited that we had a record number of session submission - over 500! The sessions are now set, and we have a a href=https://amsterdam2014.drupal.org/sessionsgreat line up/a, covering some of the most relevant topics for our community. There will be fun as well, of course. What's more fun than a bicycle? Apparently nothing, because many of our attendees are purchasing the a href=https://amsterdam2014.drupal.org/travel#transitbike package/a as part of their registration! And of course, there's a href=http://tourdedrupal.drupalgardens.com/Tour de Drupal/a. /p pa href=http://latinamerica2015.drupal.org/DrupalCon Latin America/a is the first DrupalCon scheduled for 2015. The site is scheduled to be up in mid-August for session submissions. We are also working on determining how we will handle languge and translation at DrupalCon Latin America. Working with the local team, we are discussing options for content translation so that we can serve both English and Spanish speakers. /p h3 Drupal.org/h3 pWe were able to create a lot of momentum for Drupal.org at DrupalCon Austin. Staff and Working group members conducted several user research interviews for the a href=https://assoc.drupal.org/blog/tvn/whitney-hess-lead-drupalorg-user-researchUser Research Project/a led by Whitney Hess. And, in the weeks following DrupalCon, our staff were able to a href=https://assoc.drupal.org/blog/tvn/drupal.org-team-week-notes-27deploy over 30 patches/a to Drupal.org that came out of the sprints in Austin. /p pIn addition, we also recently deployed a CDN service for Drupal.org. The CDN allows us to reduce strain on our infrastructure, increase our security, and most importantly should increase performance for users, especially those outside of the United States. We want to thank Narayan Newton (a href=https://www.drupal.org/user/94675nnewton/a) and the rest of the Drupal.org Infrastructure Working Group for their direction and help./p pFinally, there is a new way for you to keep on top of change notifications for Drupal.org. We've standardized the reporting and, in addition to posting them online at Drupal.org, a href=https://www.drupal.org/news/change-notifications-drupalorgyou can now subscribe to an email list/a to receive notifications right in your inbox./p h3 Board Governance/h3 pAt the June board retreat in Austin, each of the a href=https://assoc.drupal.org/node/18868board committees/a met to discuss current issues. The Governance Committee met with the aim of exploring ideas that would increase the diversity of candidates for our elected candidates, possible term limits for board members, and how to improve committee performance on the board. Based on that conversation, the committee presented a href=https://docs.google.com/a/association.drupal.org/presentation/d/1Vy_XctxtbhSPHkK4cLl85zcLiDP_9HfVoZnQQoWNnIM/editseveral ideas for the board to discuss/a. No decisions were made at this time, but the Governence Committee did receive good feedback to incorporate into future proposals. /p h3 Next Meeting/h3 pWant more board news? Get it live! Join us at one of our a href=https://assoc.drupal.org/about/meetupcoming board meetings/a. /p pemFlickr photo: a href=https://www.flickr.com/photos/20441752@N02/14392115861/in/photolist-nVMmCD-nVZ53o-nVN2QX-nVZaiU-nW1KtW-nDBVcb-nDA5Dj-nVZNjC-nDAegS-nDA44L-nVXyXQ-nU385y-nDADme-nW6fwD-nQG2si-nDBdsH-nDAnto-nDAQJL-nDAdZC-nDAf92-nDBbMD-nVZkT1-nXSczZ-nXSfTH-nDA7Qe-nDAxCw-nDAbFR-nVN1HM-nVXFxU-nU3JzG-nXSxPB-nW5Rzg-nVZn7U-nW5NTV-nW5U4K-nW5KpR-nU3rDs-nXSy82-nDAfBr-nDAyJ8-nDAn93-nU3Hg9-nW5ELH-nXSgSg-nU3k4o-nDBy9r-nU3eP5-nDAxZo-nVMZfX-nU3sXjKristen Pol/a/em/p /div/div/div

Deeson Online: Deeson Online and DrupalCon Amsterdam: From rockstar speakers to world-class sessions

Mon, 07/14/2014 - 21:12
div class=field field-name-title field-type-ds field-label-hiddendiv class=field-itemsdiv class=field-item even property=dc:titleh1 class=h4Deeson Online and DrupalCon Amsterdam: From rockstar speakers to world-class sessions/h1/div/div/divdiv class=metaBy a href=/category/author/lizzie-hodgsonLizzie Hodgson/a | 14th July 2014/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedh5Look alive! DrupalCon Amsterdam is going to be here in no time, and Deeson Online are once again a proud Silver Sponsor of what is shaping up to be a rather spectacular event./h5 pPossibily emthe /emmost significant date in the European Drupal community diary, a href=https://amsterdam2014.drupal.org/DrupalCon Amsterdam/a will not only offer all the usual mix of community summit, sessions, BOFs and sprints, it also has some very impressive keynotes, including co-editor of a href=http://boingboing.net/Boing Boing/a, Cory Doctorow./p p style=text-align: center;img alt= src=/sites/default/files/uploads/cory_doctorow_portrait_by_jonathan_worth_2.jpg style=width: 420px; height: 447px; //p h6Photo credit: a href=http://jonathanworth.comJonathan Worth/a CC Attribution-Share Alike 2.0 Generic license/h6 pA regular contributor to emThe Guardian/em, the emNew York Times/em, emPublishers Weekly/em and emWired/em, Doctorow is formerly the Director of European Affairs for the Electronic Frontier Foundation, as well as a renowned advocate of freedom in technology law, policy, standards and treaties. Nice./p h4Deeson Online are getting involved too!/h4 pWe'll share our BOFs in the next few weeks, but Deeson Online MD, Tim Deeson, is going to be running a session with Vesa Palmu from Wunderkraut, Paul Johnson from CTI Digital and Jeff Walpole of Phase2 – all chaired by Robert Douglass from Commerce Guys./p h4About the session/h4 pEntitled a href=https://amsterdam2014.drupal.org/session/life-fast-lane-achieving-sustainable-growth'Life in the fast lane - achieving sustainable growth'/a the panel will explain how they built their world-class Drupal businesses./p pFrom growing pains to scaling to meet demand, the audience can quiz each panellist on how they've broken through various barriers to get to where they are as a company./p h4Key topics will include:/h4 ul liHow do you differentiate your business in the market?/li liDescribe a defining moment which changed your business/li liTo service larger clients, what specialisms have you needed to deliver in-house?/li liHow does your business plan to sustain growth ie VC, Acquisition, JV?/li liWhat is the most challenging aspect of delivering larger projects?/li liHow do you mitigate risk?/li liWhat is the biggest challenge your business foresees?/li liHow should large Drupal shops contribute to the sustainability of the project?/li /ul h5a href=https://amsterdam2014.drupal.org/session/life-fast-lane-achieving-sustainable-growthSo if you want to learn from leaders of four of the world's most accomplished Drupal businesses, this session is for you!/a/h5 /div/div/div

Lullabot: Module Monday: Honeypot

Mon, 07/14/2014 - 20:00
pFighting spam is an ongoing cat and mouse game as site owners come up with protections against spam, and spammers come up with increasingly impressive ways to bypass those protections. Solutions like Mollom have been popular in recent years, however Mollom is tied to an external service and only works while that service is running smoothly. Additionally, it costs money if your site has a lot of traffic. CAPTCHA challenges are also a popular solution, but they have accessibility problems -- and automated tools are getting increasingly successful at bypassing them./p

Acquia: The Open Source Value Proposition

Mon, 07/14/2014 - 16:36
div class=field field-name-body field-type-text-with-summary field-label-hidden div class=field-items div property=content:encoded class=field-item evenpEvery so often, advocates and vendors of proprietary/closed source software attempt a FUD (Fear, Uncertainty amp; Doubt) campaign of comment and link-baiting in order to reframe the conversation around Open Source. The arguments brought up in these discussions are predictable and generally straw man arguments that hold little water, so I wanted to take time to break these down and show the real value proposition of Open Source platforms, web content management systems generally, and Drupal specifically./p/div /div /div span property=dc:title content=The Open Source Value Proposition class=rdf-meta/span

Stanford Web Services Blog: Module of the Day: Path Redirect Import

Mon, 07/14/2014 - 15:02
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedp class=summaryToday we're going take a look at the a href=https://www.drupal.org/project/path_redirect_importPath Redirect Import module/a, which lets you import redirects in bulk into your Drupal site./p pAll of the modules described in this post are available on a href=https://sites.stanford.eduStanford Sites/a./p/div/div/div

legomenon.io: Function scope Drupal cache

Mon, 07/14/2014 - 13:48
div class=field field--name-title-field field--type-text field--label-hiddendiv class=field__itemsdiv class=field__item evenFunction scope Drupal cache/div/div/divdiv class=field field--name-field-image field--type-image field--label-hiddendiv class=field__itemsdiv class=field__item even rel=og:image rdfs:seeAlso resource=http://legomenon.io/sites/default/files/field/image/11139399306_c55444f06b_b-1.jpg/div/div/divdiv class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item even property=content:encodedpWhen developing with caching in mind it's important to consider functionality scope. For example, writing code which is per visitor specific in PHP with caching support ahhh =O. While rewriting that same functionality in JavaScript offers us a quick and cache friendly solution. Consider the following examples./p pre div class=prism-wrapper rel=phpprecode class=language-php /** * Implements hook_preprocess_TEMPLATE(). */ function THEME_preprocess_page(amp;$variables) { $detect = mobile_switch_mobile_detect(); if ($detect['ismobiledevice'] amp;amp; !$detect['istablet']) { $variables['logo'] = url('sites/all/themes/THEME/images/logo_rev.png', array('absolute' =gt; TRUE)); } } /code/pre/div /pre pre div class=prism-wrapper rel=phpprecode class=language-php /** * Custom header block content. */ function _header_search_content_block() { $detect = mobile_switch_mobile_detect(); $form = drupal_get_form('search_form'); // Format search form. $form['basic']['keys']['#attributes']['placeholder'] = t('Search'); $form['basic']['keys']['#title_display'] = 'invisible'; $form['basic']['keys']['#size'] = 20; if ($detect['ismobiledevice'] || $detect['istablet']) { $form['basic']['keys']['#size'] = 15; } $items = array( render($form), l(t('another item'), 'link') ); return theme('item_list', array('items' =gt; $items)); } /code/pre/div /pre pClearly this code can be easily rewritten in JavaScript. However with caching enabled we'll need a method to pass our device detection variables. The only function which is exempt from Drupal cache is boot(). Calling drupal_add_js() directly from hook_boot() fails; the following example is using Mobile Switch and illustrates a work around./p pre div class=prism-wrapper rel=phpprecode class=language-php /** * This is an example of how to manipulate site elements with page * caching enabled. We pass our detection variables to js settings * which we can then act on. */ function MODULE_boot() { $detect = mobile_switch_mobile_detect(); // Whatami. $_SESSION['detect'] = array( 'ismobile' =gt; $detect['ismobiledevice'], 'istablet' =gt; $detect['istablet'] ); } /** * Implements hook_init(). */ function MODULE_init() { drupal_add_js(array('detect' =gt; $_SESSION['detect']), 'setting'); } /code/pre/div /pre pre div class=prism-wrapper rel=javascriptprecode class=language-javascript /** * @file * MODULE.theme.js */ (function($) { Drupal.behaviors.MODULE = { attach: function(context, settings) { // Swap logo for mobile. if (settings.detect.ismobile amp;amp; !settings.detect.istablet) { $('.site-branding__logo img').attr('src', Drupal.settings.basePath + 'sites/all/themes/THEME/images/logo_rev.png'); } // Search box size. if (settings.detect.ismobile || settings.detect.istablet) { $('.l-region--header .search-form input.form-text').attr('size', 15); } } }; }(jQuery)); /code/pre/div /pre pThese flags can of course be used for more fruitful purposes =)... Note, this sort of consideration is most likely second nature to most Xd./p/div/div/div

CTI Digital: Installing Drush using Composer on Mac OS X 10.9 Mavericks

Mon, 07/14/2014 - 12:46
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodeddivFollowing on from our previous guidenbsp;ldquo;a href=http://www.ctidigital.com/blog/creating-and-using-publicprivate-ssh-key-pair-mac-os-x-109-mavericksCreating and using an public/private SSH key-pair in Mac OS X 10.9 Mavericks/ardquo; in which we walked you through the process of setting up Git on Max OS X 10.9 Mavericks, wersquo;re now going to look at installing Drush using Composer./divdivnbsp;/divdivIf yoursquo;re never heard of Drush before, the description provided on the nbsp;a href=https://github.com/drush-ops/drushDrush GitHub repository/anbsp;offers a succinct and accurate explanation of what Drush is and the tools it makes available to you:/divdivnbsp;/divdiv style=margin-left: 40px;Drush is a command line shell and Unix scripting interface for Drupal. If you are unfamiliar with shell scripting, reviewing the documentation for your shell (e.g. man bash) or reading an online tutorial (e.g. search for quot;bash tutorialquot;) will help you get the most out of Drush./divdiv style=margin-left: 40px;nbsp;/divdiv style=margin-left: 40px;Drush core ships with lots of useful commands for interacting with code like modules/themes/profiles. Similarly, it runs update.php, executes sql queries and DB migrations, and misc utilities like run cron or clear cache./divdivnbsp;/divdivUltimately our goal in these series of guides is to give anyone both experienced and inexperienced alike the knowledge and skills required to configure their system so that an installation of Drupal can be run from it with a suite of tools available for them to use from the get-go./divdivnbsp;/divdivLetrsquo;s begin./divdivnbsp;/divh4strongInstalling Composer/strong/h4divnbsp;/divdivRather than installing Drush manually, wersquo;re going to let a tool called Composer do all the hard work for us. Composer is a tool for handing dependency management the full description for which can be found on the a href=https://getcomposer.org/doc/00-intro.mdComposer site/a.nbsp;In a nutshell though, the following sums up Composer well:/divdiv style=margin-left: 40px;nbsp;/divdiv style=margin-left: 40px;Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you./divdivnbsp;/divdivLetrsquo;s install Composer. Open a new instance of the Terminal by either navigating to the Applications folder within the finder followed by the Utilities sub-folder, or alternatively by pressing ldquo;Cmd+Spacerdquo; and typing ldquo;Terminalrdquo; followed by the ldquo;Enterrdquo; key./divdivnbsp;/divdivOnce open, type the following command to ensure yoursquo;re in your home directory:/divdivnbsp;/divdivspan style=font-family:courier new,courier,monospace;cd ~//span/divdivnbsp;/divdivTo download composer, type the following command into the Terminal and hit enter:/divdivnbsp;/divdivspan style=font-family:courier new,courier,monospace;curl -sS https://getcomposer.org/installer| php/span/divdivnbsp;/divdivAt this point you could typespan style=font-family:courier new,courier,monospace; ldquo;~/composer.phar --helprdquo;/span into the command line and yoursquo;ll most likely get a list Composer help documentation, but we want to be able to access Composer simply by typing the command span style=font-family:courier new,courier,monospace;ldquo;composerrdquo;/span, so letrsquo;s move the *.phar file into our ldquo;/user/local/binrdquo; directory./divdivnbsp;/divdivstrongNote: On a fresh installation of OS X 10.9, thespan style=font-family:courier new,courier,monospace; ldquo;/usrrdquo;/span directory will very likely be empty. If this is the case, to enable us to successfully move Composer to ldquo;/usr/local/bin/composerrdquo; yoursquo;ll need to type the following two commands span style=font-family:courier new,courier,monospace;ldquo;sudo mkdir /usr/localrdquo;/span andspan style=font-family:courier new,courier,monospace; ldquo;sudo mkdir /user/local/binrdquo;/span. After typing the first command, you may be prompted for your system password. Simply enter it to continue./strong/divdivnbsp;/divdivNow wersquo;re all set to move Composer. To do this, type the following command into the Terminal:/divdivnbsp;/divdivspan style=font-family:courier new,courier,monospace;mv composer.phar /usr/local/bin/composer/span/divdivnbsp;/divdivstrongNote: If you get an error trying to move the file, prefix the command above with ldquo;sudordquo; and try again./strong/divdivnbsp;/divdivWe should now be able to type span style=font-family:courier new,courier,monospace;ldquo;composerrdquo;/span into the terminal and get something other than an error returned. Try this out by typingspan style=font-family:courier new,courier,monospace; ldquo;composerrdquo;/span and hitting enter./divdivnbsp;/divh4strongAdding the Composer ldquo;binrdquo; directory to our path/strong/h4divnbsp;/divdivOnce Drush is installed, we will be able to typespan style=font-family:courier new,courier,monospace; ldquo;~/.composer/vendor/bin/drushrdquo;/span followed by the Drush command of our choice, but who wants to do that every time?nbsp;/divdivnbsp;/divdivTo be enable the ability to typespan style=font-family:courier new,courier,monospace; ldquo;drushrdquo;/span followed by our command we need to add Composerrsquo;s bin directory to our path./divdivnbsp;/divdivIn your home directory span style=font-family:courier new,courier,monospace;ldquo;~/ldquo; /spantype the commandspan style=font-family:courier new,courier,monospace; ldquo;nano ~/.bash_profilerdquo; /spanand add the following line to the file that opens up:/divdivnbsp;/divdivspan style=font-family:courier new,courier,monospace;export PATH=quot;$HOME/.composer/vendor/bin:$PATHquot;/span/divdivnbsp;/divdivQuit Nano, by pressing ldquo;Ctrl+Xrdquo; and when asked if you wish to save the document type ldquo;Yrdquo; and hit ldquo;Enterrdquo;./divdivnbsp;/divdivFinally we need to re-source our ldquo;.bash_profilerdquo; file by typing span style=font-family:courier new,courier,monospace;ldquo;source ~/.bash_profilerdquo;/span into the Terminal (alternatively you can quit and re-open the Terminal)./divdivnbsp;/divh4strongInstalling Drush/strong/h4divnbsp;/divdivAt this point, installing Drush is a piece of cake. Simply type the following into the Terminal and hit ldquo;Enterrdquo;/divdivnbsp;/divdivspan style=font-family:courier new,courier,monospace;composer global require drush/drush:dev-master/span/divdivnbsp;/divdivDrush should now be installed. To ensure it is, type ldquo;drushrdquo; into the command line and you should see a series of Drush help documentation./divdivnbsp;/divdivIf you had any problems following this guide feel free to get in touch with me on Twitter at a href=https://twitter.com/craigperks@craigperks/a/div/div/div/div

Wunderkraut blog: Configuration Entities in Drupal 8

Mon, 07/14/2014 - 11:10
p class=field-ns-blog-post-lead With the overhaul of many API#039;s in Drupal 8, one of the new kids on the block is the configuration system with its integration with the entity API. This means that we can now define configuration entities (that work much like the regular content entities) for the purpose of managing more complex configuration. For example, a View is a configuration entity and so is a field or an image style. /p div class=field-ns-blog-post-body clearfix div class=field-item even pIn this article we will look at how to define a configuration entity type that will serve a simple purpose, describe dummy emflower/em configuration entities. We will do so in a module called emflower/em and will use the alpha13 release of Drupal 8 to do it./p pBefore we get started, let's define a practical goal for this tutorial. As I said, we will have a flower config entity type with a couple of properties: name, number of petals, color and season. And by the end, we will have a fully fledged UI to create and manage them. The final code you can also find in a href=https://github.com/upchuk/drupal-8-config-entities target=_blankthis repository/a./p pSo let's begin./p h2The configuration entity interface/h2 pThe first thing we need to do is define an interface our emFlower/em entity type class can implement and that extends the default a href=https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Config%21Entity%21ConfigEntityInterface.php/interface/ConfigEntityInterface/8ConfigEntityInterface/a. So inside of our module's emsrc//em folder, create a file called emFlowerInterface.php/em with the following interface:/p div class=geshifilterpre class=php geshifilter-php style=font-family:monospace;span style=color: #009933; font-style: italic;/** * @file * Contains \Drupal\flower\FlowerInterface. *//span nbsp; span style=color: #000000; font-weight: bold;namespace/span Drupal\flowerspan style=color: #339933;;/span nbsp; span style=color: #000000; font-weight: bold;use/span Drupal\Core\Config\Entity\ConfigEntityInterfacespan style=color: #339933;;/span nbsp; span style=color: #009933; font-style: italic;/** * Provides an interface defining a flower entity type. *//span span style=color: #000000; font-weight: bold;interface/span FlowerInterface span style=color: #000000; font-weight: bold;extends/span ConfigEntityInterface span style=color: #009900;#123;/span nbsp; span style=color: #009900;#125;/span/pre/div pAs you can see, we are just extending the default configuration entity interface without adding any methods to it (which is possible)./p h2The configuration entity class/h2 pNext, we will focus on the crux of defining our own configuration entity class. Go ahead and create a folder inside the emsrc//em directory called emEntity/em, and within it, a file called emFlowerEntity.php/em:/p div class=geshifilterpre class=php geshifilter-php style=font-family:monospace;span style=color: #009933; font-style: italic;/** * @file * Contains \Drupal\flower\Entity\FlowerEntity. *//span nbsp; span style=color: #000000; font-weight: bold;namespace/span Drupal\flower\Entityspan style=color: #339933;;/span nbsp; span style=color: #000000; font-weight: bold;use/span Drupal\Core\Config\Entity\ConfigEntityBasespan style=color: #339933;;/span span style=color: #000000; font-weight: bold;use/span Drupal\Core\Config\Entity\ConfigEntityInterfacespan style=color: #339933;;/span span style=color: #000000; font-weight: bold;use/span Drupal\flower\FlowerInterfacespan style=color: #339933;;/span nbsp; span style=color: #009933; font-style: italic;/** * Defines a Flower configuration entity class. * * @ConfigEntityType( * id = quot;flowerquot;, * label = @Translation(quot;Flowerquot;), * fieldable = FALSE, * controllers = { * quot;list_builderquot; = quot;Drupal\flower\FlowerListBuilderquot;, * quot;formquot; = { * quot;addquot; = quot;Drupal\flower\Form\FlowerFormquot;, * quot;editquot; = quot;Drupal\flower\Form\FlowerFormquot;, * quot;deletequot; = quot;Drupal\flower\Form\FlowerDeleteFormquot; * } * }, * config_prefix = quot;flowerquot;, * admin_permission = quot;administer site configurationquot;, * entity_keys = { * quot;idquot; = quot;idquot;, * quot;labelquot; = quot;namequot; * }, * links = { * quot;edit-formquot; = quot;flower.editquot;, * quot;delete-formquot; = quot;flower.deletequot; * } * ) *//span span style=color: #000000; font-weight: bold;class/span FlowerEntity span style=color: #000000; font-weight: bold;extends/span ConfigEntityBase implements FlowerInterface span style=color: #009900;#123;/span nbsp; span style=color: #009933; font-style: italic;/** * The ID of the flower. * * @var string *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000088;$id/spanspan style=color: #339933;;/span nbsp; span style=color: #009933; font-style: italic;/** * The flower name. * * @var string *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000088;$name/spanspan style=color: #339933;;/span nbsp; span style=color: #009933; font-style: italic;/** * The flower color. * * @var string *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000088;$color/spanspan style=color: #339933;;/span nbsp; span style=color: #009933; font-style: italic;/** * The number of petals. * * @var int *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000088;$petals/spanspan style=color: #339933;;/span nbsp; span style=color: #009933; font-style: italic;/** * The season in which this flower can be found. * * @var string *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000088;$season/spanspan style=color: #339933;;/span nbsp; span style=color: #009900;#125;/span/pre/div pWhat we have here is a simple class defining the entity properties we want (name, id, color, number of petals and season). This class extends the default a href=https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Config%21Entity%21ConfigEntityBase.php/class/ConfigEntityBase/8ConfigEntityBase/a class and implements our interface. What happens above the class definition is what's interesting though./p pUsing a href=https://api.drupal.org/api/drupal/core!modules!system!system.api.php/group/annotation/8annotations/a, we are basically telling Drupal about our emFlower/em entity type./p pThe em@ConfigEntityType/em tells Drupal that this is a configuration entity type (as opposed to a plugin or something else). Within its definition, we have an array-like structure with the following information (I will only mention the keys that are not super obvious):/p ulliemlabel/em - the label of the entity type passed through the translation system./li liemfieldable/em - the configuration entities are not fieldable, but the content entities are. Since we are using the same entity API, we can specify this./li liemcontrollers/em - all the classes needed to manage these entities. The emlist_builder/em class will provide an admin overview interface of the entities, whereas the emform/em classes are used to perform the CRUD operations through the UI./li liemconfig_prefix/em - a configuration identifier/li liementity keys/em - mapping of the main entity keys to the entity properties we defined. For instance, when we call the emlabel()/em method on the entity object, it will return the flower name./li liemlinks/em - administration links for editing and deleting entities with values referencing routes. Specifying them here will make Drupal add them automatically to the emoperations/em column on the entity overview page (we'll see this in a minute)./li /ulpFor more information about the structure of an entity class annotation, follow this a href=https://drupal.org/node/2207559documentation page/a./p h2The entity forms/h2 pThe next thing we need to do is create the forms we referenced in the annotations above: for adding, editing and deleting flower entities. The cool thing is that the form for emadding/em can be reused for emediting/em as well. For delete, we extend a special class that gives us all we need for a confirmation form. But first, the add/edit form (emFlowerForm.php/em) inside of the emsrc/Form//em folder:/p div class=geshifilterpre class=php geshifilter-php style=font-family:monospace;span style=color: #009933; font-style: italic;/** * @file * Contains \Drupal\flower\Form\FlowerForm. *//span nbsp; span style=color: #000000; font-weight: bold;namespace/span Drupal\flower\Formspan style=color: #339933;;/span nbsp; span style=color: #000000; font-weight: bold;use/span Drupal\Core\Entity\EntityFormspan style=color: #339933;;/span span style=color: #000000; font-weight: bold;use/span Drupal\Core\Entity\EntityInterfacespan style=color: #339933;;/span span style=color: #000000; font-weight: bold;use/span Drupal\Core\Entity\EntityTypeInterfacespan style=color: #339933;;/span span style=color: #000000; font-weight: bold;use/span Drupal\Core\Urlspan style=color: #339933;;/span nbsp; span style=color: #009933; font-style: italic;/** * Class FlowerForm * * Form class for adding/editing flower config entities. *//span span style=color: #000000; font-weight: bold;class/span FlowerForm span style=color: #000000; font-weight: bold;extends/span EntityForm span style=color: #009900;#123;/span nbsp; span style=color: #009933; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span formspan style=color: #009900;#40;/spana href=http://www.php.net/arrayspan style=color: #990000;array/span/a span style=color: #000088;$form/spanspan style=color: #339933;,/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/a span style=color: #339933;amp;/spanspan style=color: #000088;$form_state/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span nbsp; span style=color: #000088;$form/span span style=color: #339933;=/span parentspan style=color: #339933;::/spanspan style=color: #004000;form/spanspan style=color: #009900;#40;/spanspan style=color: #000088;$form/spanspan style=color: #339933;,/span span style=color: #000088;$form_state/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span nbsp; span style=color: #000088;$flower/span span style=color: #339933;=/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;entity/spanspan style=color: #339933;;/span nbsp; span style=color: #666666; font-style: italic;// Change page title for the edit operation/span span style=color: #b1b100;if/span span style=color: #009900;#40;/spanspan style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;operation/span span style=color: #339933;==/span span style=color: #0000ff;'edit'/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span span style=color: #000088;$form/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'#title'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Edit flower: @name'/spanspan style=color: #339933;,/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/spanspan style=color: #0000ff;'@name'/span span style=color: #339933;=gt;/span span style=color: #000088;$flower/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;name/spanspan style=color: #009900;#41;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #009900;#125;/span nbsp; span style=color: #666666; font-style: italic;// The flower name./span span style=color: #000088;$form/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'name'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/span span style=color: #0000ff;'#type'/span span style=color: #339933;=gt;/span span style=color: #0000ff;'textfield'/spanspan style=color: #339933;,/span span style=color: #0000ff;'#title'/span span style=color: #339933;=gt;/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Name'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #0000ff;'#maxlength'/span span style=color: #339933;=gt;/span span style=color: #cc66cc;255/spanspan style=color: #339933;,/span span style=color: #0000ff;'#default_value'/span span style=color: #339933;=gt;/span span style=color: #000088;$flower/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;name/spanspan style=color: #339933;,/span span style=color: #0000ff;'#description'/span span style=color: #339933;=gt;/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;quot;Flower name.quot;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #0000ff;'#required'/span span style=color: #339933;=gt;/span span style=color: #009900; font-weight: bold;TRUE/spanspan style=color: #339933;,/span span style=color: #009900;#41;/spanspan style=color: #339933;;/span nbsp; span style=color: #666666; font-style: italic;// The unique machine name of the flower./span span style=color: #000088;$form/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'id'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/span span style=color: #0000ff;'#type'/span span style=color: #339933;=gt;/span span style=color: #0000ff;'machine_name'/spanspan style=color: #339933;,/span span style=color: #0000ff;'#maxlength'/span span style=color: #339933;=gt;/span EntityTypeInterfacespan style=color: #339933;::/spanspan style=color: #004000;BUNDLE_MAX_LENGTH/spanspan style=color: #339933;,/span span style=color: #0000ff;'#default_value'/span span style=color: #339933;=gt;/span span style=color: #000088;$flower/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;id/spanspan style=color: #339933;,/span span style=color: #0000ff;'#disabled'/span span style=color: #339933;=gt;/span span style=color: #339933;!/spanspan style=color: #000088;$flower/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;isNew/spanspan style=color: #009900;#40;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #0000ff;'#machine_name'/span span style=color: #339933;=gt;/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/span span style=color: #0000ff;'source'/span span style=color: #339933;=gt;/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/spanspan style=color: #0000ff;'name'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #0000ff;'exists'/span span style=color: #339933;=gt;/span span style=color: #0000ff;'flower_load'/span span style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #009900;#41;/spanspan style=color: #339933;;/span nbsp; span style=color: #666666; font-style: italic;// The flower color./span span style=color: #000088;$form/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'color'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/span span style=color: #0000ff;'#type'/span span style=color: #339933;=gt;/span span style=color: #0000ff;'textfield'/spanspan style=color: #339933;,/span span style=color: #0000ff;'#title'/span span style=color: #339933;=gt;/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Color'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #0000ff;'#maxlength'/span span style=color: #339933;=gt;/span span style=color: #cc66cc;255/spanspan style=color: #339933;,/span span style=color: #0000ff;'#default_value'/span span style=color: #339933;=gt;/span span style=color: #000088;$flower/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;color/spanspan style=color: #339933;,/span span style=color: #0000ff;'#description'/span span style=color: #339933;=gt;/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;quot;Flower color.quot;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #0000ff;'#required'/span span style=color: #339933;=gt;/span span style=color: #009900; font-weight: bold;TRUE/spanspan style=color: #339933;,/span span style=color: #009900;#41;/spanspan style=color: #339933;;/span nbsp; span style=color: #666666; font-style: italic;// The number of petals./span span style=color: #000088;$form/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'petals'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/span span style=color: #0000ff;'#type'/span span style=color: #339933;=gt;/span span style=color: #0000ff;'textfield'/spanspan style=color: #339933;,/span span style=color: #0000ff;'#title'/span span style=color: #339933;=gt;/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Petals'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #0000ff;'#maxlength'/span span style=color: #339933;=gt;/span span style=color: #cc66cc;255/spanspan style=color: #339933;,/span span style=color: #0000ff;'#default_value'/span span style=color: #339933;=gt;/span span style=color: #000088;$flower/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;petals/spanspan style=color: #339933;,/span span style=color: #0000ff;'#description'/span span style=color: #339933;=gt;/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;quot;The number of petals.quot;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #0000ff;'#required'/span span style=color: #339933;=gt;/span span style=color: #009900; font-weight: bold;TRUE/spanspan style=color: #339933;,/span span style=color: #009900;#41;/spanspan style=color: #339933;;/span nbsp; span style=color: #666666; font-style: italic;// The season./span span style=color: #000088;$form/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'season'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/span span style=color: #0000ff;'#type'/span span style=color: #339933;=gt;/span span style=color: #0000ff;'select'/spanspan style=color: #339933;,/span span style=color: #0000ff;'#options'/span span style=color: #339933;=gt;/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/span span style=color: #0000ff;'Spring'/span span style=color: #339933;=gt;/span span style=color: #0000ff;'Spring'/spanspan style=color: #339933;,/span span style=color: #0000ff;'Summer'/span span style=color: #339933;=gt;/span span style=color: #0000ff;'Summer'/spanspan style=color: #339933;,/span span style=color: #0000ff;'Automn'/span span style=color: #339933;=gt;/span span style=color: #0000ff;'Automn'/spanspan style=color: #339933;,/span span style=color: #0000ff;'Witer'/span span style=color: #339933;=gt;/span span style=color: #0000ff;'Winter'/span span style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #0000ff;'#title'/span span style=color: #339933;=gt;/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Season'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #0000ff;'#maxlength'/span span style=color: #339933;=gt;/span span style=color: #cc66cc;255/spanspan style=color: #339933;,/span span style=color: #0000ff;'#default_value'/span span style=color: #339933;=gt;/span span style=color: #000088;$flower/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;season/spanspan style=color: #339933;,/span span style=color: #0000ff;'#description'/span span style=color: #339933;=gt;/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;quot;The season in which this flower grows.quot;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;,/span span style=color: #0000ff;'#required'/span span style=color: #339933;=gt;/span span style=color: #009900; font-weight: bold;TRUE/spanspan style=color: #339933;,/span span style=color: #009900;#41;/spanspan style=color: #339933;;/span nbsp; span style=color: #b1b100;return/span span style=color: #000088;$form/spanspan style=color: #339933;;/span span style=color: #009900;#125;/span nbsp; span style=color: #009933; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span savespan style=color: #009900;#40;/spana href=http://www.php.net/arrayspan style=color: #990000;array/span/a span style=color: #000088;$form/spanspan style=color: #339933;,/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/a span style=color: #339933;amp;/spanspan style=color: #000088;$form_state/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span nbsp; span style=color: #000088;$flower/span span style=color: #339933;=/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;entity/spanspan style=color: #339933;;/span nbsp; span style=color: #000088;$status/span span style=color: #339933;=/span span style=color: #000088;$flower/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;save/spanspan style=color: #009900;#40;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span nbsp; span style=color: #b1b100;if/span span style=color: #009900;#40;/spanspan style=color: #000088;$status/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span span style=color: #666666; font-style: italic;// Setting the success message./span drupal_set_messagespan style=color: #009900;#40;/spanspan style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Saved the flower: @name.'/spanspan style=color: #339933;,/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/span span style=color: #0000ff;'@name'/span span style=color: #339933;=gt;/span span style=color: #000088;$flower/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;name/spanspan style=color: #339933;,/span span style=color: #009900;#41;/spanspan style=color: #009900;#41;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #009900;#125;/span span style=color: #b1b100;else/span span style=color: #009900;#123;/span drupal_set_messagespan style=color: #009900;#40;/spanspan style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'The @name flower was not saved.'/spanspan style=color: #339933;,/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/span span style=color: #0000ff;'@name'/span span style=color: #339933;=gt;/span span style=color: #000088;$flower/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;name/spanspan style=color: #339933;,/span span style=color: #009900;#41;/spanspan style=color: #009900;#41;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #009900;#125;/span span style=color: #000088;$url/span span style=color: #339933;=/span span style=color: #000000; font-weight: bold;new/span Urlspan style=color: #009900;#40;/spanspan style=color: #0000ff;'flower.list'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #000088;$form_state/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'redirect'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$url/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;toString/spanspan style=color: #009900;#40;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span nbsp; span style=color: #009900;#125;/span nbsp; span style=color: #009900;#125;/span /pre/div pIn our emFlowerForm/em class we are extending the Drupal a href=https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21EntityForm.php/class/EntityForm/8EntityForm/a class and implementing 2 of its methods: emform()/em and emsave()/em. In the first one, we define a regular Form API form very similar to what we do in Drupal 7. But there are a few cool new things happening there as well:/p ulliWe extend the parent form and add our elements to that definition./li liWe get the configuration entity object from the ementity/em property of the parent class./li liWe check the operation being performed on the entity and if the user is editing it, we change the title of the page to reflect this/li liInstead of using the procedural emt()/em function, we access em$this-gt;t()/em on the parent class for a href=https://www.drupal.org/node/2079611best practice/a./li liWe access the config entity public properties and set them as the defaults in the form elements' definition./li liFor the emmachine_name/em, we use the emflower_load()/em helper function (that we will need to define in our em.module/em file) in order to automatically check whether an entity with that ID already exists./li /ulpIn the emsave()/em method we perform the simple operation of saving the entity object to the configuration system. Couldn't get simpler than this. And after the save is performed, we redirect to the flower entity overview page. Here we use the a href=https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Url.php/class/Url/8Url/a class to build a url object based on a route (that we will define later)./p pNext, let's quickly create the delete form./p pInside the same emsrc/Form//em folder, create a emFlowerDeleteForm.php/em file with the following class:/p div class=geshifilterpre class=php geshifilter-php style=font-family:monospace;span style=color: #009933; font-style: italic;/** * @file * Contains \Drupal\flower\Form\FlowerDeleteForm. *//span span style=color: #000000; font-weight: bold;namespace/span Drupal\flower\Formspan style=color: #339933;;/span nbsp; span style=color: #000000; font-weight: bold;use/span Drupal\Core\Entity\EntityConfirmFormBasespan style=color: #339933;;/span span style=color: #000000; font-weight: bold;use/span Drupal\Core\Urlspan style=color: #339933;;/span nbsp; span style=color: #009933; font-style: italic;/** * Form that handles the removal of flower entities. *//span span style=color: #000000; font-weight: bold;class/span FlowerDeleteForm span style=color: #000000; font-weight: bold;extends/span EntityConfirmFormBase span style=color: #009900;#123;/span nbsp; span style=color: #009933; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span getQuestionspan style=color: #009900;#40;/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span span style=color: #b1b100;return/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Are you sure you want to delete this flower: @name?'/spanspan style=color: #339933;,/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/spanspan style=color: #0000ff;'@name'/span span style=color: #339933;=gt;/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;entity/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;name/spanspan style=color: #009900;#41;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #009900;#125;/span span style=color: #009933; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span getCancelRoutespan style=color: #009900;#40;/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span span style=color: #b1b100;return/span span style=color: #000000; font-weight: bold;new/span Urlspan style=color: #009900;#40;/spanspan style=color: #0000ff;'flower.list'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #009900;#125;/span span style=color: #009933; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span getConfirmTextspan style=color: #009900;#40;/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span span style=color: #b1b100;return/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Delete'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #009900;#125;/span span style=color: #009933; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span submitspan style=color: #009900;#40;/spana href=http://www.php.net/arrayspan style=color: #990000;array/span/a span style=color: #000088;$form/spanspan style=color: #339933;,/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/a span style=color: #339933;amp;/spanspan style=color: #000088;$form_state/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span nbsp; span style=color: #666666; font-style: italic;// Delete and set message/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;entity/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;delete/spanspan style=color: #009900;#40;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span drupal_set_messagespan style=color: #009900;#40;/spanspan style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'The flower @label has been deleted.'/spanspan style=color: #339933;,/span a href=http://www.php.net/arrayspan style=color: #990000;array/span/aspan style=color: #009900;#40;/spanspan style=color: #0000ff;'@label'/span span style=color: #339933;=gt;/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;entity/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;name/spanspan style=color: #009900;#41;/spanspan style=color: #009900;#41;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #000088;$form_state/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'redirect_route'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;getCancelRoute/spanspan style=color: #009900;#40;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span nbsp; span style=color: #009900;#125;/span span style=color: #009900;#125;/span/pre/div pWith this form class we are extending the Drupal a href=https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21EntityConfirmFormBase.php/class/EntityConfirmFormBase/8EntityConfirmFormBase/a that provides us with all we need for a delete confirmation form. By implementing these self-explanatory methods, we take care of the entity delete process. Finally, it's time to define the admin overview page./p h2The entity list builder/h2 pAs we declared when defining the config entity class, we now need a class file responsible for building the overview page of our entities. So straight in the emsrc//em folder of our module you can create a emFlowerListBuilder.php/em class file with the following class:/p div class=geshifilterpre class=php geshifilter-php style=font-family:monospace;span style=color: #009933; font-style: italic;/** * @file * * Contains Drupal\flower\FlowerListBuilder *//span nbsp; span style=color: #000000; font-weight: bold;namespace/span Drupal\flowerspan style=color: #339933;;/span nbsp; span style=color: #000000; font-weight: bold;use/span Drupal\Core\Config\Entity\ConfigEntityListBuilderspan style=color: #339933;;/span span style=color: #000000; font-weight: bold;use/span Drupal\Core\Entity\EntityInterfacespan style=color: #339933;;/span nbsp; nbsp; span style=color: #000000; font-weight: bold;class/span FlowerListBuilder span style=color: #000000; font-weight: bold;extends/span ConfigEntityListBuilder span style=color: #009900;#123;/span nbsp; span style=color: #009933; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span buildHeaderspan style=color: #009900;#40;/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span span style=color: #000088;$header/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'label'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Name'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #000088;$header/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'color'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Color'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #000088;$header/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'petals'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Number of petals'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #000088;$header/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'season'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'Season'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #b1b100;return/span span style=color: #000088;$header/span span style=color: #339933;+/span parentspan style=color: #339933;::/spanspan style=color: #004000;buildHeader/spanspan style=color: #009900;#40;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #009900;#125;/span nbsp; span style=color: #009933; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span buildRowspan style=color: #009900;#40;/spanEntityInterface span style=color: #000088;$entity/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span nbsp; span style=color: #666666; font-style: italic;// Label/span span style=color: #000088;$row/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'label'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;getLabel/spanspan style=color: #009900;#40;/spanspan style=color: #000088;$entity/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span nbsp; span style=color: #666666; font-style: italic;// Color/span span style=color: #000088;$row/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'color'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$entity/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;color/spanspan style=color: #339933;;/span nbsp; span style=color: #666666; font-style: italic;// Petals/span span style=color: #000088;$row/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'petals'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$entity/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;petals/spanspan style=color: #339933;;/span nbsp; span style=color: #666666; font-style: italic;// Season/span span style=color: #000088;$row/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'season'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$entity/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;season/spanspan style=color: #339933;;/span nbsp; span style=color: #b1b100;return/span span style=color: #000088;$row/span span style=color: #339933;+/span parentspan style=color: #339933;::/spanspan style=color: #004000;buildRow/spanspan style=color: #009900;#40;/spanspan style=color: #000088;$entity/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #009900;#125;/span nbsp; span style=color: #009933; font-style: italic;/** * {@inheritdoc} *//span span style=color: #000000; font-weight: bold;public/span span style=color: #000000; font-weight: bold;function/span renderspan style=color: #009900;#40;/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span nbsp; span style=color: #000088;$build/span span style=color: #339933;=/span parentspan style=color: #339933;::/spanspan style=color: #004000;render/spanspan style=color: #009900;#40;/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span nbsp; span style=color: #000088;$build/spanspan style=color: #009900;#91;/spanspan style=color: #0000ff;'#empty'/spanspan style=color: #009900;#93;/span span style=color: #339933;=/span span style=color: #000088;$this/spanspan style=color: #339933;-gt;/spanspan style=color: #004000;t/spanspan style=color: #009900;#40;/spanspan style=color: #0000ff;'There are no flowers available.'/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #b1b100;return/span span style=color: #000088;$build/spanspan style=color: #339933;;/span span style=color: #009900;#125;/span nbsp; span style=color: #009900;#125;/span /pre/div pIn this class that extends the a href=https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!Entity!ConfigEntityListBuilder.php/class/ConfigEntityListBuilder/8ConfigEntityListBuilder/a, we implement three methods. The embuildHeader()/em method is responsible for creating the table header of our overview page whereas embuildRow()/em will create the rows based on the number of entities and their values. Lastly, we are overriding the emrender()/em method so that we can specify a custom message to display in case there are no entities to show (personal preference). And that's basically it with the list builder class./p h2Miscellaneous/h2 pThere are a few more things we need to take care of in order to round up our configuration entity type. The first one has a href=https://www.drupal.org/node/2288297just became kind of mandatory/a so I'll start with that: a href=https://www.drupal.org/node/1905070the configuration schema/a. So let's quickly create the folder structure inside our module (emconfig/schema//em) and inside a file called emflower.schema.yml/em we can have the following:/p div class=geshifilterpre class=php geshifilter-php style=font-family:monospace;span style=color: #666666; font-style: italic;# Schema for the configuration files of the Flower module. /span flowerspan style=color: #339933;./spanflowerspan style=color: #339933;.*:/span typespan style=color: #339933;:/span mapping labelspan style=color: #339933;:/span span style=color: #0000ff;'Flower'/span mappingspan style=color: #339933;:/span idspan style=color: #339933;:/span typespan style=color: #339933;:/span string labelspan style=color: #339933;:/span span style=color: #0000ff;'Flower identifier'/span uuidspan style=color: #339933;:/span typespan style=color: #339933;:/span string labelspan style=color: #339933;:/span span style=color: #0000ff;'UUID'/span namespan style=color: #339933;:/span typespan style=color: #339933;:/span label labelspan style=color: #339933;:/span span style=color: #0000ff;'Name'/span colorspan style=color: #339933;:/span typespan style=color: #339933;:/span string labelspan style=color: #339933;:/span span style=color: #0000ff;'Color'/span translatablespan style=color: #339933;:/span span style=color: #009900; font-weight: bold;true/span petalsspan style=color: #339933;:/span typespan style=color: #339933;:/span integer labelspan style=color: #339933;:/span span style=color: #0000ff;'Number of petals'/span seasonspan style=color: #339933;:/span typespan style=color: #339933;:/span string labelspan style=color: #339933;:/span span style=color: #0000ff;'Season'/span translatablespan style=color: #339933;:/span span style=color: #009900; font-weight: bold;true/span/pre/div pOn the first line (after the comment) we start defining the schema for the em(flower module).(flower configuration entity type).(all flower configuration entities)/em. And it follows to map all the entity properties and specify what data type they are. Although the emuuid/em property was not defined by us, Drupal adds it by default and we can specify it here./p pAs far as I could tell, the emlabel/em-typed properties become translatable automatically whereas for all the rest we want translatable we can specify emtranslatable: true/em. Translation is one of the biggest reasons for which we use these schemas for configuration entities./p pAnd now that the schema is taken care of, it's time for some finishing touches. First, let's create our routes so that we can access everything in the browser. Inside of a file called emflower.routing.yml/em in the module root folder, add the following:/p div class=geshifilterpre class=php geshifilter-php style=font-family:monospace;flowerspan style=color: #339933;./spana href=http://www.php.net/listspan style=color: #990000;list/span/aspan style=color: #339933;:/span pathspan style=color: #339933;:/span span style=color: #0000ff;'/admin/structure/flowers'/span defaultsspan style=color: #339933;:/span _entity_listspan style=color: #339933;:/span span style=color: #0000ff;'flower'/span _titlespan style=color: #339933;:/span span style=color: #0000ff;'Flowers'/span requirementsspan style=color: #339933;:/span _permissionspan style=color: #339933;:/span span style=color: #0000ff;'administer site configuration'/span flowerspan style=color: #339933;./spanaddspan style=color: #339933;:/span pathspan style=color: #339933;:/span span style=color: #0000ff;'/admin/structure/flowers/add'/span defaultsspan style=color: #339933;:/span _entity_formspan style=color: #339933;:/span span style=color: #0000ff;'flower.add'/span _titlespan style=color: #339933;:/span span style=color: #0000ff;'Add a new flower'/span requirementsspan style=color: #339933;:/span _permissionspan style=color: #339933;:/span span style=color: #0000ff;'administer site configuration'/span flowerspan style=color: #339933;./spaneditspan style=color: #339933;:/span pathspan style=color: #339933;:/span span style=color: #0000ff;'/admin/structure/flowers/edit/{flower}'/span defaultsspan style=color: #339933;:/span _entity_formspan style=color: #339933;:/span span style=color: #0000ff;'flower.edit'/span _titlespan style=color: #339933;:/span span style=color: #0000ff;'Edit flower'/span requirementsspan style=color: #339933;:/span _permissionspan style=color: #339933;:/span span style=color: #0000ff;'administer site configuration'/span flowerspan style=color: #339933;./spandeletespan style=color: #339933;:/span pathspan style=color: #339933;:/span span style=color: #0000ff;'/admin/structure/flowers/delete/{flower}'/span defaultsspan style=color: #339933;:/span _entity_formspan style=color: #339933;:/span span style=color: #0000ff;'flower.delete'/span _titlespan style=color: #339933;:/span span style=color: #0000ff;'Delete flower'/span requirementsspan style=color: #339933;:/span _permissionspan style=color: #339933;:/span span style=color: #0000ff;'administer site configuration'/span/pre/div pFor more information about the structure of a route file (and what the above keys actually mean), please consult a href=https://www.drupal.org/node/2092643this documentation page/a. But an important take-away are the paths we defined at emadmin/structure/flowers/em./p pSecond, on the flower overview page, we'd probably like a link to add new flowers to the site. So let's create another YML file in the root of our module called emflower.local_actions.yml/em to define that link:/p div class=geshifilterpre class=php geshifilter-php style=font-family:monospace;flowerspan style=color: #339933;./spanaddspan style=color: #339933;:/span route_namespan style=color: #339933;:/span span style=color: #0000ff;'flower.add'/span titlespan style=color: #339933;:/span span style=color: #0000ff;'Add flower'/span appears_onspan style=color: #339933;:/span span style=color: #339933;-/span flowerspan style=color: #339933;./spana href=http://www.php.net/listspan style=color: #990000;list/span/a/pre/div pThis is a simple local action link definition called emflower.add/em that uses the emflower.add/em route and appears on the page given by the route emflower.list/em. For more information about defining local actions, consult a href=https://www.drupal.org/node/2133247this documentation page/a./p pThird, we can create a menu link under the emStructure/em admin menu that will take us to the flower overview page. So inside of a file called emflower.menu_links.yml/em in the module root folder, add the following:/p div class=geshifilterpre class=php geshifilter-php style=font-family:monospace;flowerspan style=color: #339933;./spana href=http://www.php.net/listspan style=color: #990000;list/span/aspan style=color: #339933;:/span titlespan style=color: #339933;:/span Flowers descriptionspan style=color: #339933;:/span span style=color: #0000ff;'Administer the flower entities'/span parentspan style=color: #339933;:/span a href=http://www.php.net/systemspan style=color: #990000;system/span/aspan style=color: #339933;./spanadmin_structure route_namespan style=color: #339933;:/span flowerspan style=color: #339933;./spana href=http://www.php.net/listspan style=color: #990000;list/span/a/pre/div pHere we create a link called emflower.list/em found under the emsystem.admin_structure/em link and that uses the emflower.list/em route name. Simple./p pFinally, we need to create the auto loader function that will be used by the emmachine_name/em form element to check whether an entity with a given machine name already exists (on the flower emadd/em form). So inside the emflower.module/em file, create this function:/p div class=geshifilterpre class=php geshifilter-php style=font-family:monospace;span style=color: #009933; font-style: italic;/** * Menu argument loader. Returns a flower entity * * @param $id * @return \Drupal\Core\Entity\EntityInterface|static *//span span style=color: #000000; font-weight: bold;function/span flower_loadspan style=color: #009900;#40;/spanspan style=color: #000088;$id/spanspan style=color: #009900;#41;/span span style=color: #009900;#123;/span span style=color: #b1b100;return/span FlowerEntityspan style=color: #339933;::/spanspan style=color: #004000;load/spanspan style=color: #009900;#40;/spanspan style=color: #000088;$id/spanspan style=color: #009900;#41;/spanspan style=color: #339933;;/span span style=color: #009900;#125;/span/pre/div pAnd don't forget to emuse/em the emFlowerEntity/em class at the top of the file:/p div class=geshifilterpre class=php geshifilter-php style=font-family:monospace;span style=color: #000000; font-weight: bold;use/span \Drupal\flower\Entity\FlowerEntityspan style=color: #339933;;/span/pre/div pAnd that should be about it. Clear the caches, make sure the module is enabled, and start poking at it. Navigate to em/admin/structure/flowers/em and create, edit, delete flower entities. Additionally, you can turn on configuration translation and translate all your entities into multiple languages. Cool, no?/p h2Conclusion/h2 pIn this tutorial we've looked at how we can create our own simple configuration entity type in Drupal 8. The emalpha13/em version (latest at the time of writing) has been used for this, so make sure that if you are using a newer one you make the necessary code adaptations if needed./p pIn Drupal 7 we do not have configuration entities and we are left with creating custom tables that hold data meant as configuration. And obviously, integration with the modest D7 entity API is practically inexistent. This all changes in Drupal 8 with the development of a robust entity API - fully integrated with the multilingual and configuration systems. Because of this, we now have exportable and translatable configuration entities used to manage more complex data that is not content./p pAnd with all these new developments, we are being introduced to a few new concepts that can scare us a bit (a href=http://www.webomelette.com/drupal-8-dependency-injection-service-container-and-all-jazzservices, dependency injection/a, a href=https://www.drupal.org/node/1637614#comment-7415530plugins/a, a href=http://drupalwatchdog.com/volume-3/issue-1/object-oriented-programming-101OOP/a and so on). However, once we get used to them a bit, they will become a friend rather than foe and open the door to more sane, performant and modern development within the Drupal framework./p /div /div