Skip to Content

Drupal

Modules Unraveled: 129 Automation Tools with Solomon Gifford - Modules Unraveled Podcast

Planet Drupal - 15 January 2015 - 5:44am
Published: Thu, 01/15/15Download this episodeUse Cases
  • Okay, I can already see huge benefits of utilizing these tools. But, I’d love to get your opinion on what the benefits are for Developers/Site-builders/Themers?
    • There are two big benefits as I see them, and another not so apparent. First, a lot of these tasks are repetitive. And things like copying a database may take a bit of time. Or merging code. Or running tests. Etc. Anything that you can automate means time you can spend on other things. Second, not everyone is as experienced - or maybe they don’t have the permissions - to execute all the tasks. You don’t want mistakes, you don’t want to give everyone permissions. So you figure out the best way to do it and then you automate it. The last reason is not as obvious. I think a lot of times we hack things together in our development environments to get it working - but then may run into issues later on. We don’t spend the extra time because its temporary. By spending a little extra time getting it right, we have created a reusable pattern that we can use on our next project. By encapsulating our best practices, we not only have a quicker setup, but we have a better one too.
  • Perfect. So, save time by automating tasks like copying a database. Prevent mistakes by limiting who has permissions to execute tasks, and automating them so that even those who do have permission can’t introduce user error. And by setting up a process that uses best practices, creating new environments is faster, and better than if I had to try to remember all of the steps myself.
    • Exactly. And I’ll add, ansible can be used for each of installation, configuration, and orchestration. The examples we’ve talked about so far are orchestration - moving databases, code, etc. It can also be used to install Apache, Mysql, Mongodb, etc. Any set of system commands that are repeatable.
  • Oh... So if you’ve got a server that you have full access to, you could actually wipe and rebuild the entire server AND Drupal site? We’re not limited to just configuring the Drupal site?
    • Exactly. And throw in Vagrant into the mix and now you can do that on your local machines using Virtual machines. Immagine spinning up a brand new VM and within a few clicks you have your entire development environment with a fresh drupal install all ready for you on a VM.
  • Now, I do wonder who this is more geared toward. Developers, Site-builders or Themers. I understand that each of them can use these, and would probably help them all with their daily tasks, but who do you see benefiting the most from these tools. Or, do you have examples of people in each category that you know of that are using them?
    • I think all three benefit from automation. For example, in a previous life where I didn’t use Ansible, my themer was insanely good at theming, but when it came to running commands remotely on a server to check out his work, he was a fish out of water. I wish I had written an Ansible playbook so that he could check his code out onto staging. Or even better, if I had set up Jenkins to run an Ansible playbook to automatically check it out his work each time he committed. He wouldn’t have had to wait on me, sometimes a few days if I was not around. That said, he would not have been able create the ansible playbook.
    • As for who is using Ansible, well, Twitter does - they use it to roll out updates across their hundreds of machines. And of course BlackMesh, the hosting company I work for, also does. The product Cascade I mentioned uses ansible and Jenkins to do a lot of the things we talked about today, only we set it up so you don’t have to.
Episode Links: Solomon on drupal.orgSolomon on TwitterSolomon Gifford GitHubBlackMesh GitHubJenkinsAnsibleTags: AutomationWorkflowJenkinsAnsibleplanet-drupal
Categories: Drupal

Code Karate: Drupal Auto Assign Role Module

Planet Drupal - 15 January 2015 - 5:11am
Episode Number: 190

The Drupal 7 Auto Assign Role module allows you a lot of flexibility in deciding what roles users receive on your Drupal 7 website. If you have ever needed to allow a user to select their own role, or if you have ever needed to automatically assign a role to every user on your Drupal site. This is the module for you.

Tags: DrupalUsersDrupal 7Drupal Planet
Categories: Drupal

Drupal Association News: A Few Things to Unwrap on Drupal's Birthday

Planet Drupal - 15 January 2015 - 5:07am

Happy birthday to Drupal! On this day in 2001, Drupal 1.0 was released.

This milestone is the perfect time to talk about some of the findings of our recent community survey. The survey findings offer a window into what community members are thinking as the project matures and evolves. It also gives us at the Drupal Association a way to better understand what we're doing right and what we could be doing better. There aren't many surprises (and that's a good thing), but all of the findings are educational. Here are three results we thought were particularly interesting and insightful.

Drupal 8 Will Be Broadly Adopted


In the survey, about 80% of respondents said they either plan to start using Drupal 8 as soon as it is released, or plan to adopt it at some point after release. Another 8% said they did not have specific plans to adopt, but do plan to evaluate Drupal 8.

 

 

 

Drupal.org Remains an Important and Heavily-Used Tool


The overwhelming majority of respondents said they use Drupal.org more than once per week. Most also say they are satisfied or somewhat satisfied with the site. While that result is encouraging, it does not change the important mission to improve the experience of the site and make it a better tool for everyone from first time visitors to those who spend the majority of their working time on the site.

 

 

 

 

We Need to Create Broader Awareness of Drupal Association Programs


Community members who took the survey have great awareness of DrupalCons. Awareness of the work we are doing on Drupal.org seems to be steadily growing. But awareness is relatively low for Community Grants and our Supporter Programs that provide a way for organizations to give back to the Project. That awareness is clearly something we need to improve to promote transparency.

 

 

 

 

If you would like to read the full results, you can access them here (2.8M PDF). Thanks for reading, and thanks for being a part of this amazing community.

 

Categories: Drupal

PreviousNext: Drupal 8 Critical Office hours

Planet Drupal - 14 January 2015 - 9:17pm

In an effort to continue the velocity of work on Drupal 8 criticals from the Ghent criticals sprint, we've taken it upon ourselves to get together for at least one hour each Friday to focus on Drupal 8 criticals

Read on to find out what we got up to in the first week, but also how you can get involved.

Categories: Drupal

Bluespark Labs: 5 Technologies to focus on in 2015

Planet Drupal - 14 January 2015 - 8:58pm

Last year we wrote about 5 technologies to focus on in 2014. Last year’s article is still worth a read. Many of the things on the 2014 list are still very relevant.

In keeping with the best of yearly traditions, we want to follow up with the 5 technologies worth your attention in 2015. These are not bleeding edge technologies. Rather, these are technologies or platforms or ideas that are starting to mature and are worth investing your time and getting ahead of the curve.

DevOps & Security

If 2014 was anything, it was the year of security incidents, hacks, cracks and general information insecurity. In addition to the ones that actually made the headlines, Drupal suffered its own infamous moment during the so-called "Drupalgeddon". A vulnerability that if not fixed exposed your site to a critical attack.

Bluespark was one of a handful of shops that addressed the issue within minutes of the incident, which meant that clients hardly suffered. Drupal sites that did not benefit from the same care were exposed and, at worst, compromised.

What these security incidents highlighted is the need for site owners to have effective processes in place to update websites and servers. That points to developing an effective DevOps practice around your site. At Drupalcon Amsterdam, Bluespark talked about the value that DevOps generates. Part of that is precisely being able to deal with security incidents quickly. Security incidents cannot be prevented. The key is to be able to react quickly to them once vulnerabilities go public. Effective DevOps do just that.

Web Everywhere

The past year has seen a proliferation of devices that are internet-connected and aim to augment what our laptops, tablets and phones already do. In 2015 we are going to see the Apple Watch land on people’s wrists and Samsung has announced that every device it produces will be connected to the internet.

It’s like we’re living in the future.

At the same time, Amazon has launched tools such as AWS Lambda that allow you to effectively react to a variety of events through services.

The opportunities and possibilities for customer engage are about to explode in a way only previously hinted at. And if you’re not taking advantage of this new ecosystem, your competitors will be.

There are still many, many questions about this new ecosystem. What can you do with the new products and services? How are people going to use them?

More importantly for you, though, are the systems that run your web infrastructure ready for these new developments? Are your web content management system and web-based services able to manipulate content and perform actions in a way that can take advantage of these new devices?

Web Everywhere means that overall engagement strategies need to be defined, content strategies refined and content management systems fine-tuned to produce the right message and appropriate interaction. After all, people might not be going to your website from their fridge, but that doesn’t mean that having an internet-connected fridge is pointless.

Content-Driven Commerce

Many ecommerce sites are finally starting to catch on to a fundamental truth about sales: it’s not about the transaction, it’s about engagement. And how do you engage your audience? Certainly not by throwing out sale after sale. People are getting bombarded with promotions, their inboxes are getting clogged with the latest deals. It's time to take a step forward. Sort out how you can stand out from the crowd and connect with an audience that wants to make a purchase, though they aren't necessarily interested in being sold on something.

And that's the problem. If all your doing is selling, then you’re missing the point. Many e-commerce sites are so focused on the latest deal -- on the close -- that they forget a fundamental aspect of selling: telling a great story. People want to engage with a meaningful brand. They want a story that compels them to buy. A few brands are picking up on this, though not nearly enough.

Drupal is in a unique position to drive Content-Driven Commerce forward. Platform is one of the biggest challenges companies face when trying to integrate content and commerce. Drupal (along with Drupal Commerce or Acquia Commerce) tightly integrates both the commerce and content pieces of a website, making it easier than ever to craft stories that can drive conversions.

Context-Rich Systems

Last year we also talked about personalization for websites and experience management, which is really just another way to talk about context -- albeit a simple form of context.

Context-Rich systems go deeper than personalized websites, though. They are systems that pull in a number of diverse signals about the user and their context -- from their location, to the weather, device they are on, speed they are traveling. And like personalized websites, context-rich systems can adjust content, display, and input methods based on the user’s current situation. They will allow better feedback for the user and they allow the user to perform more through the website by linking together disparate services seamlessly.

In 2015, these systems will start to form as people bring more and more internet-connected devices (creating a personal ecosystem) into the home and business. In the past, when companies have tried to take advantage of Context-Rich Systems, they have applied old paradigms of understanding (hence why internet-connected fridges are the butt of many jokes) to the new technologies. But the companies that realize the possibilities in a way that doesn’t disrupt their customer’s lives, they will truly leap ahead.

Visualization

One of the technologies we mentioned in the 2014 article was deep analytics. Well 2014 has only increased the possibilities to collect even more data from more sources. The next step is to ensure that data is correlated correctly and visualized in ways that transform into useful, actionable information.

After all, what’s the use of data if you don’t know what to do with it?

Visualization technologies will become mainstream in 2015, and websites should expect to have information analyzed and presented in a variety of different ways so as to fit their needs. Vizualization libraries such as D3.js and search engines such as Solr have reached a level of maturity that allows for them to be fully and effectively exploited now.

2015 will be...

Every year it seems like new technologies are hyped. Different visions of the future are trotted out as the “next big thing.” We’re definitely excited about these technologies and think that, over the next few years, they have the potential to really change the landscape of e-commerce and technology, in general. We encourage you to do your own research into the technologies and tell us what you think. More importantly, though, think about how you can make use of these technologies in your own business. If time and money weren’t an issue, how might you use these technologies to give your boost your business ahead of the competition?

Tags: Drupal Planet
Categories: Drupal

Console Logger

New Drupal Modules - 14 January 2015 - 8:03pm

The Console Logger module does one thing and does it simply. It lets you use the PHP built in web server for local development and provides helpful logging to the console related to incoming requests, parameters, and log messages.

Just enable the module, and then start up a local server with drush runserver 2> /dev/null. (The 2> /dev/null will silence all the bits from the built in web server that show requests for static assets, such as CSS, JS and images.)

Categories: Drupal

Webform wait-list

New Drupal Modules - 14 January 2015 - 7:18pm

This module is an extension of Webform. It implements a waiting list feature. This may be used with event registrations to help manage the submissions. Submissions made after the wait-list threshhold has been reached will be flagged and the submitting user notified in the form interface.

The module integrates with:

Categories: Drupal

FileField Sources View

New Drupal Modules - 14 January 2015 - 3:07pm

This module is an extension of FileField Sources. It adds a file source based on existing files but uses a view to filter the list of existing files that may be referenced.

On the field settings form, you may specify the view and display to use.

Categories: Drupal

vilepickle.com: Print your theme's logo path in Drupal 8 with Twig

Planet Drupal - 14 January 2015 - 1:04pm

I'm updating a Drupal 6 theme to Drupal 8.  One thing I'm doing is making the logo in my Twig template a Twig variable instead of hardcoding the path.  Here's how you do it.  This assumes a theme named 'acton', but you'll change that to your own theme's name.

In 'acton.theme', assuming your logo is 'logo.png' in your theme's root:

read more

Categories: Drupal

Lullabot: Nate Haug: Forking Drupal

Planet Drupal - 14 January 2015 - 1:00pm

Lullabot has a new monthly show, hosted by Matthew Tift, featuring in-depth interviews with open source and free software advocates.

This inaugural episode of Hacking Culture introduces the idea of software forking, one of the fundamental characteristics of free software, and Matthew talks with Nate Haug about Backdrop, a Drupal fork.

Categories: Drupal

OAuth Connector Email

New Drupal Modules - 14 January 2015 - 12:46pm

This module came out of the work to resolve #1010264: Need a way to associate to an existing account.

OAuth Connector Email provides an email field for Oauth connections which is keyed off to connect new Oauth connections to existing users. The current Oauth Connector module doesn't have this ability, and I'm not sure it should because not all Oauth implementations have an email field.

Categories: Drupal

Acquia: PHP: Getting the job done, really easily – meet Stephan Hochdörfer

Planet Drupal - 14 January 2015 - 9:27am
Language Undefined

Stephan Hochdörfer from bitExpert AG and I got the chance to sit down and chat in the event hotel lobby following his session (and my keynote address :-) at SymfonyLive Berlin, 2014.

Categories: Drupal

Entity Documentation

New Drupal Modules - 14 January 2015 - 8:04am
Overview

A module that exports entity configuration documentation. There is already implementation, through submodules, for node entities and PDF export.

There are hooks to add new entities and exporters. Please check entity_documentation.api.php

Details

At the moment there is implementation to export node entities as PDFs and JSON.

This is a development module and I advice against installing it in a production environment.

You can also continuously export the documentation files at public://entity_documentation with cron.

Categories: Drupal

Drupal retrospective 2014

Dries Buytaert - 14 January 2015 - 3:43am

It's that time again. Time to look back at 2014, and to look forward to 2015. For Drupal in 2014, it was all about Drupal 8. As Drupal 8's development enters its fourth (and hopefully, final) year of development, it's a good time to reflect on all the work achieved by the Drupal 8 team so far, and to talk about Drupal 8's momentum heading into the final stretch to the release.

Drupal 8 will have 200 new features. Among the larger features that I'm excited about are the responsive design, HTML5 support, the native web service support, the much improved multilingual support, the configuration management system, a built-in WYSIWYG editor, in-place editing, streamlined content editing, the improved entity system, and more. The list of improvements is long!

My favorite part of Drupal 8 is that it will make building all types of Drupal sites — both big and small — much easier than with Drupal 7.

Key accomplishments in 2014 include:

Drupal 8 beta 1 released

October 1, 2014, amidst the fanfare at DrupalCon Amsterdam, we released Drupal 8 beta 1. This was an important milestone in the project, marking the finalization of major APIs, which enables contributed modules to begin porting in earnest.

Total number of Drupal 8 contributors surpasses 2,500

Our 2,500th core contributor was Tasya Rukmana (tadityar), a high-school student participating in Google Code-in 2014! Awesome.

Kick-starting contributed modules in Drupal 8

Drupal 8's new object-oriented API represents a significant paradigm shift for developers (there are many benefits to this). To help Drupal 7 pros make the jump to Drupal 8, Acquia funded the Drupal Module Upgrader project. This project will not only scan a Drupal 7 module and generate a report pointing off to the appropriate documentation on how to port it, there is even a mode that automatically re-writes much of your module's code to Drupal 8 to eliminate a huge chunk of the work.

Sprints, sprints and more sprints!

We organized dozens of sprints all around the world, and together hundreds of people came together in "real life" to help get Drupal 8 released. Sprints are a key part of momentum-building in Drupal, by laser-focusing on a specific goal, or by pairing both new and experienced contributors together for mentorship. Not only do sprints make solving tough issues easier, they also provide opportunities for building relationships and "leveling up" your skills.

Drupal 8 accelerate fund

Though it was launched just a month ago, the Drupal Association's Drupal 8 Accelerate Fund is already helping to add velocity to Drupal 8, by paying key contributors to help fix particularly onerous critical issues.

What is in store for 2015? Getting the Drupal 8 release done

Our current focus is resolving the Drupal 8 upgrade path issues, which will allow early adopters of Drupal 8 to upgrade their site data between beta releases, and should result in a further uptick to Drupal 8 development velocity.

Once we reach zero critical issues, we begin the release candidate phase. Among the areas left to polish up after the Drupal 8 upgrade path issues are bringing external libraries up to date, finalizing documentation, and performance.

Continuous improvements after Drupal 8

Unlike prior versions of Drupal, Drupal 8 has adopted a new release cycle that will provide backwards-compatible "feature" releases every 6 months. I'm extremely excited about this change, as it means we can innovate on the core platform for years to come after release, versus holding all of the new goodies until Drupal 9.

Getting more organizations to contribute

We're now one of the largest Open Source projects in terms of active contributors, if not the largest. That growth requires us to evolve how we work. Over the years, we've grown from a 100% volunteer-driven model to a model where there is a mix of volunteers, contributors who are partially funded by their customers or employers, and contributors who are paid full-time to work on Drupal.

While this shift has big benefits in making Drupal more sustainable, it also means there is increasingly more corporate participation and influence. One of our biggest challenges for 2015 is to figure out how we can get more commercial organizations to step up to take on more of the shared maintenance of Drupal, while at the same time respecting the needs and desires of our entire community.

Improving our governance model

There has also been a lot of talk about optimizing the way in which we work, to make it more explicit who is responsible for what, how decisions are made, and so on. This year I plan to work with others in the community to revamp Drupal core's governance model to bring more transparency and appoint additional leadership.

Conclusion

Overall, I'm thrilled with the progress that the Drupal core contributors have made in 2014, and want to extend an enormous thanks to each and every one of our 2,500 contributors who have brought us this far. I'm feeling very positive about our momentum going into 2015.

Drupal 8 will set a new standard for ease of use, power and flexibility, and will have something for everyone to love. Without a doubt, Drupal 8 will take our community to new heights. Let's do this!

Categories: Drupal

Dries Buytaert: Drupal retrospective 2014

Planet Drupal - 14 January 2015 - 3:43am

It's that time again. Time to look back at 2014, and to look forward to 2015. For Drupal in 2014, it was all about Drupal 8. As Drupal 8's development enters its fourth (and hopefully, final) year of development, it's a good time to reflect on all the work achieved by the Drupal 8 team so far, and to talk about Drupal 8's momentum heading into the final stretch to the release.

Drupal 8 will have 200 new features. Among the larger features that I'm excited about are the responsive design, HTML5 support, the native web service support, the much improved multilingual support, the configuration management system, a built-in WYSIWYG editor, in-place editing, streamlined content editing, the improved entity system, and more. The list of improvements is long!

My favorite part of Drupal 8 is that it will make building all types of Drupal sites — both big and small — much easier than with Drupal 7.

Key accomplishments in 2014 include:

Drupal 8 beta 1 released

October 1, 2014, amidst the fanfare at DrupalCon Amsterdam, we released Drupal 8 beta 1. This was an important milestone in the project, marking the finalization of major APIs, which enables contributed modules to begin porting in earnest.

Total number of Drupal 8 contributors surpasses 2,500

Our 2,500th core contributor was Tasya Rukmana (tadityar), a high-school student participating in Google Code-in 2014! Awesome.

Kick-starting contributed modules in Drupal 8

Drupal 8's new object-oriented API represents a significant paradigm shift for developers (there are many benefits to this). To help Drupal 7 pros make the jump to Drupal 8, Acquia funded the Drupal Module Upgrader project. This project will not only scan a Drupal 7 module and generate a report pointing off to the appropriate documentation on how to port it, there is even a mode that automatically re-writes much of your module's code to Drupal 8 to eliminate a huge chunk of the work.

Sprints, sprints and more sprints!

We organized dozens of sprints all around the world, and together hundreds of people came together in "real life" to help get Drupal 8 released. Sprints are a key part of momentum-building in Drupal, by laser-focusing on a specific goal, or by pairing both new and experienced contributors together for mentorship. Not only do sprints make solving tough issues easier, they also provide opportunities for building relationships and "leveling up" your skills.

Drupal 8 accelerate fund

Though it was launched just a month ago, the Drupal Association's Drupal 8 Accelerate Fund is already helping to add velocity to Drupal 8, by paying key contributors to help fix particularly onerous critical issues.

What is in store for 2015? Getting the Drupal 8 release done

Our current focus is resolving the Drupal 8 upgrade path issues, which will allow early adopters of Drupal 8 to upgrade their site data between beta releases, and should result in a further uptick to Drupal 8 development velocity.

Once we reach zero critical issues, we begin the release candidate phase. Among the areas left to polish up after the Drupal 8 upgrade path issues are bringing external libraries up to date, finalizing documentation, and performance.

Continuous improvements after Drupal 8

Unlike prior versions of Drupal, Drupal 8 has adopted a new release cycle that will provide backwards-compatible "feature" releases every 6 months. I'm extremely excited about this change, as it means we can innovate on the core platform for years to come after release, versus holding all of the new goodies until Drupal 9.

Getting more organizations to contribute

We're now one of the largest Open Source projects in terms of active contributors, if not the largest. That growth requires us to evolve how we work. Over the years, we've grown from a 100% volunteer-driven model to a model where there is a mix of volunteers, contributors who are partially funded by their customers or employers, and contributors who are paid full-time to work on Drupal.

While this shift has big benefits in making Drupal more sustainable, it also means there is increasingly more corporate participation and influence. One of our biggest challenges for 2015 is to figure out how we can get more commercial organizations to step up to take on more of the shared maintenance of Drupal, while at the same time respecting the needs and desires of our entire community.

Improving our governance model

There has also been a lot of talk about optimizing the way in which we work, to make it more explicit who is responsible for what, how decisions are made, and so on. This year I plan to work with others in the community to revamp Drupal core's governance model to bring more transparency and appoint additional leadership.

Conclusion

Overall, I'm thrilled with the progress that the Drupal core contributors have made in 2014, and want to extend an enormous thanks to each and every one of our 2,500 contributors who have brought us this far. I'm feeling very positive about our momentum going into 2015.

Drupal 8 will set a new standard for ease of use, power and flexibility, and will have something for everyone to love. Without a doubt, Drupal 8 will take our community to new heights. Let's do this!

Categories: Drupal

InternetDevels: Automated testing on Jenkins + Selenium basis

Planet Drupal - 14 January 2015 - 12:05am

Hello everyone! At some point the project evolves to the stage, when you start thinking about some new step in its development. It is quite clear, that you put yourself questions like “What is to be done at the website first of all? Better control on quality assurance?”. If so, it is high time to consider implementing CI.

Read more
Categories: Drupal

YesCT: Making MidCamp more accessible

Planet Drupal - 13 January 2015 - 11:10pm
Making MidCamp more accessible

Even though it's still two months away, I know that MidCamp 2015 (March 19 - 22) is going to be special. The venue hosting MidCamp this year is the University of Illinois at Chicago. UIC is both my alma mater and present employer. Student Center East (where the training and conference sessions will take place) may be familiar grounds to me, but these days I am looking at it from the perspective of a visitor who is completely unfamiliar with its layout.

UIC Student Center East entrance from Polk and Halsted streetsVenue accessibility

Liz Henry's article Unlocking the Invisible Elevator identifies some of the ways in which conference organizers can be proactive about event accessibility:

Some information is great to have in advance. Maps and explanations of access paths work well. It helps if they’re in web-accessible formats, usable by screen readers, and downloadable. Some information has to be embedded in your conference venue. Signs should clearly mark the accessible paths. Maps are very helpful so that people can estimate distances; this is a big deal for those of us who are exhausted and in pain. Put maps next to your signs please!

In late November, I did a preliminary walkthrough of Student Center East. I meandered around the building, photographing the main entrance to Student Center East, the location, interiors and paths to elevators, escalators and stairways, major "landmarks" for points of reference, and the conference area hallways and rooms. It may sound a bit like I was casing the place, but I learned about traffic flow, congestion areas and different points of entry to each floor, whether by escalator and stairs or elevator.

Next, I contacted folks from UIC Office of Facility and Space Planning to obtain floor plans for each of the buildings and floors where MidCamp events are going to take place. They were quick to respond and the floor plans I got are very detailed. I annotated them, marking session rooms, elevators, restrooms and possible traffic flow. The annotations will serve as blueprint for locations of signs, as well as written directions that will be posted to the website.

Annotated floor plan of Student Center East ground floor, with photos of elevator #6 and escalator overlaid.

This week, MidCamp organizers and I plan to do another walkthrough at UIC. Together we hope to identify and address any accessibility and navigation pitfalls. Photos, annotated floor plans, and navigation information will be posted to the MidCamp website. We want to make sure that there is good information about the venue available ahead of time, as well as informative signs on the spot when you attend MidCamp.

Of course, floor plans and elevators are not the only aspect of conference accessibility. Childcare, real-time captioning, transcripts and captioning of session videos are some of the other ways in which events are made more accessible to diverse audiences. It's a direction that I hope MidCamp will follow.

Anonymized session selection

Another reason why I'm excited about is that MidCamp session submission is now open (it will close on Monday January 19). The session selection committee will pick from anonymized submissions for 20 and 50 minute talks. From the conference website:

  1. A volunteer who is NOT on the selection team will anonymize and remove gendered pronouns from abstracts/bios.
  2. The team will make a first round of selections from the anonymized submissions.
  3. A second round will then make sure we have not selected speakers multiple times (excluding panel participants).

By anonymizing session selection, we hope to give thorough consideration to everyone's proposals without biases ("oh, I know this speaker," or "I've never heard of this speaker"). Having a diverse lineup of speakers from all experience levels is important to us. A few weeks ago, Cathy Theys brainstormed a list of topics spanning social, technical, business, and other aspects of Drupal ecosystem that would be welcome at MidCamp. The list is long, but by no means exhaustive.

Are you on the fence about submitting a proposal? Take a look at the variety of suggestions for topics and fill out the submission form (the deadline is Monday, January 19). I want to see you at MidCamp!

References and resources

Contact me on Drupal.org or on Twitter. -alimac

Categories: Drupal

Capgemini Engineering: Drupal 8 PSR-4 Form compatibility in Drupal 7

Planet Drupal - 13 January 2015 - 4:00pm

Up until Drupal 8 there has been little to encourage well organised code. It now has PSR-4 autoloading so your classes are automatically included. Even though Drupal 8 is just round the corner, a lot of us will still be using Drupal 7 for quite a while, however that doesn’t mean we can’t benefit from this structure in Drupal 7.

This post covers two parts:

  1. Autoloading class files.
  2. Avoiding extra plumbing to hook into your class methods.

You’re probably familiar with drupal_get_form(‘my_example_form’) which then looks for a function my_example_form(). The issue is that your form definition will no longer be in such a function but within a method in a class. To cover both these parts we will be using two modules:

  1. XAutoLoad - Which will autoload our class.
  2. Cool - Which allows us to abstract the usual functions into class methods.

Drupal 8 was originally using PSR-0 which has been deprecated in favour of PSR-4. As a consequence the Cool module uses PSR-0 in its examples although it does support PSR-4. We will create an example module called psr4_form.

The information on autoloading and folder structure for PSR-4 in Drupal 8 states that we should place our form class in psr4_form/src/Form/FormExample.php however the cool module instead loads from a FormControllers folder: psr4_form/src/FormControllers/FormExample.php.

We can get round this by providing our own hook_forms() as laid out in the Cool module:

/** * Implements hook_forms(). */ function psr4_form_forms($form_id, $args) { $classes = \Drupal\cool\Loader::mapImplementationsAvailable('Form', '\Drupal\cool\Controllers\FormController'); unset($classes['Drupal\\cool\\BaseForm']); unset($classes['Drupal\\cool\\BaseSettingsForm']); $forms = array(); foreach ($classes as $class_name) { $forms[$class_name::getId()] = array( 'callback' => 'cool_default_form_callback', 'callback arguments' => array($class_name), ); } return $forms; }

If you are ok placing your class in the FormControllers folder then you can omit the above function to keep your .module file simple or you could put the hook in another module. Potentially the Cool module could be updated to reflect this.

This class requires a namespace of the form Drupal\<module_name>\Form. It also extends the BaseForm class provided by the Cool module so we don’t need to explicitly create our form functions:

namespace Drupal\psr4_form\Form; class FormExample extends \Drupal\cool\BaseForm { ... }

Within our FormExample class we need a method getId() to expose the form_id to Drupal:

public static function getId() { return 'psr4_form'; }

And of course we need the form builder:

public static function build() { $form = parent::build(); $form['my_textfield'] = array( '#type' => 'textfield', '#title' => t('My textfield'), ); return $form; }

All that is left is to define your validate and submit methods following the Drupal 8 form API.

At the time of writing, the Cool module isn’t up to date with Drupal 8 Form API conventions. I started this blog post with the intention of a direct copy and paste of the src folder. Unfortunately the methods don’t quite follow the exact same conventions and they also need to be static:

Drupal 7 Drupal 8 getId getFormId build buildForm validate validateForm submit submitForm

This example module can be found at https://github.com/oliverpolden/psr4_form.

Taking it further

Drupal 8 is just round the corner but a lot of us will still be using Drupal 7 for the foreseeable future. Taking this approach allows us to learn and make use of Drupal 8 conventions as well as making it easier to migrate from Drupal 7. It would be nice to see the Cool module be brought up to date with the current API, perhaps something I will be helping with in the not so distant future.

Links Modules Information

Drupal 8 PSR-4 Form compatibility in Drupal 7 was originally published by Capgemini at Capgemini on January 14, 2015.

Categories: Drupal

Hide user signature

New Drupal Modules - 13 January 2015 - 3:35pm

This module allow hide user signature in comments.

Support Views and Rules with Entity API.

Categories: Drupal

S3 File System Migrate

New Drupal Modules - 13 January 2015 - 2:50pm

This module integrates with the S3 File System (S3FS) module (version 2.x). S3FS enables storing newly uploaded and generated files on Amazon's Simple Storage Service. S3FS Migrate allows migrating existing locally stored files to S3. S3FS Migrate has the following features:

Categories: Drupal
Syndicate content


Google+
about seo