Feed aggregator
DrupalCon Portland 2013: Introducing PMoFs: BOFs for Project Management
The people have spoken, and the DA has answered! There will now be an AV equipped BoF room devoted to the Art of Project Management in its many forms. We’d like to send a shout out to the DA for the help in securing a space*, to our community’s project managers for your feedback and ideas and to the presenters who generously offered to join in and share their ideas!
Propeople Blog: Limiting select options for exposed filter
While I was working on a project here at Propeople, I had a requirement to limit the options for an exposed filter in order to get only options that will give some results. Unfortunately Views don’t provide this kind of functionality.
Let's start with an example. I have a Content Type called "People" which has a Term Reference select list. Generally speaking we have to alter the “views_exposed_form”.
Follow the next 3 steps:
1. Create a custom module and implement hook_form_alter(). I strongly recommend not to use a form-specific alteration like hook_form_FORM_ID_alter() instead of global hook_form_alter() because it is difficult to control and manage your code. function [my-module-name]_form_alter) {
dsm($form); //be sure to enable devel module.
}
2. Now you should get the content from the $form variable
3. Next, we have to select all the matching results based on our conditions in order to edit the options from $form['term']['#options']. Personally, I prefer to query directly with db_select, but feel free to use EntityFieldQuery if you prefer.
function [my-module-name]_form_alter(&$form, &$form_state, $form_id) {
if ($form['#id'] == 'views-exposed-form-people-list-page') {
$available_terms = _get_available_terms();
if (isset($available_terms)) {
// Unset the existing list and add new one with available terms.
unset($form['term']['#options']);
$form['term']['#options']['All'] = '- Any Term -';
foreach ($available_terms as $available_term) {
$form['term']['#options'][$available_term->tid] = $available_term->name;
}
} else {
// Unset all options except '- Any -'
unset($form['term']['#options']);
$form['term']['#options']['All'] = '- Any Term -';
}
}
}
function _get_available_terms() {
$query = db_select('taxonomy_term_data', 'terms');
$query->join('field_data_field_reference', 'term_ref', 'term_ref.field_reference_tid = terms.tid');
$term_result = $query
->fields('terms', array('tid', 'name'))
->execute()
->fetchAll();
return $term_result;
}
That's it. Follow us on Twitter, Facebook and subscribe to Propeople RSS feed to stay informed about our activity inside the Drupal community.
Language English Tags: DrupalDevelopmentTutorialsCheck this option to include this post in Planet Drupal aggregator: planetDrupalize.Me: Community Tools Curriculum (and a Dreditor Video)
On the eve of DrupalCon Portland, we're happy to be able to get another free community video out, Installing and Using Dreditor. What's more exciting though, is that this video is part of our Community Tools workshop, and in an effort to spread Drupal community involvement further than where we can show up to run this free workshop, we're putting all of our materials and notes online for everyone to use freely, with the Community Tools curriculum.
A Workshop is BornLullabot: The Mysterious Drupal Entity
Join Kyle Hofmeyer, Joe Shindelar, Blake Hall, and Greg Dunlap to talk about the somewhat mysterious concept of entities, which was introduced to Drupal in Drupal 7. We explain what entities are, why we have them, and what the future may hold for them in Drupal 8.
- Lullabot DrupalCon Party!
- Working with Entities in Drupal 7 video series
- Drupal 8 Entity API improvements issue
- Entity API module
- Core Entity documentation
- Contrib Entity API module documentation
- Examples project
- DrupalCon Portland Sprints
- DrupalCon Session: Status of the New Entity API and Typed Data
- DrupalCon Session: The Old and New Field API in Drupal 8
- DrupalCon Session: Rest and Serialization in Drupal 8
Blink Reaction: Launching Drupal Face to Face
We're pleased to announce Drupal Face to Face, our joint initiative with the Drupal Association to promote Drupalcon and Drupal Association membership. The purpose of the project is to capture the exuberance and authenticity of the Drupal community and invite others to join. We expect to bring Drupal Face to Face to Prague and other large or important Drupal events as an ongoing project. We hope you'll participate.
Drupal Face to Face is:
Code Karate: Drupal Commerce - Product Attributes
In this episode we continue learning about Drupal Commerce and begin learning how to set up Drupal Commerce Product Attributes.
In this episode you will learn:
- How to set up Drupal taxonomy vocabularies and taxonomy terms to use as product attributes.
- How to add Taxonomy term reference fields to Product types to create Drupal Commerce product attributes.
Rootwork.org: Drupal 8 and the power of Twig: A Drupalcon Portland featured session
A new theming engine, Twig, is coming along with Drupal 8's adoption of the Symfony framework. And it's downright magical.
Instead of having theme functions that have to be overridden, everything becomes an (easy to read, easy to modify) template. Instead of having to figure out render arrays, themers can use consistent template variables. And instead of having insecure output, Twig sanitizes everything by default.
If you've ever worked on a WordPress or Tumblr theme, the approach will feel pretty similar. Here's what it looks like:
And oh by the way, it's well-documented — no small point in the Drupal community!
Sound too good to be true? Well, it almost might be, because a lot has to happen in order to get this into Drupal 8. There's a Twig-focused sprint happening right after Drupalcon, so if you think this is great, come pitch in! Because if things don't get done, Twig will be held until Drupal 9. No Drupal themer, veteran or newbie, kitten or human, wants that to happen.
I spoke to Jen Lampton (with a contribution from Fabian Franz) about how Twig will result in happier veteran Drupal themers, happier new Drupal themers, and happier Drupal kittens. Be sure to show up for their featured Drupalcon session (along with Drupal CSS innovator John Albin Wilkins), “Using Twig: The new template engine in Drupal 8,” on Wednesday at 3:45 PM.
IB: What's one thing you're most excited about with Twig?
JL: Replacing the template engine with something completely different means that we get to take a good hard look at absolutely everything in the current theme system, so we can do a clean sweep.
FF: What I love the most about Twig is the syntax, and how it cleverly makes it possible to lazy-render things. The possibilities of having an interpreted language are endless.
IB: Can theme developers start converting/creating their themes now?
JL: No! If you have the time to start converting your own themes, then please, please, please use the time to help us make the theme system what you want it to be — instead. There will be time to convert your themes later, but Drupal itself can only be monumentally improved right now.
IB: Will frontend developers and themers coming from other CMSes — like WordPress — find Twig easier to use?
JL: Yes. Front end developers coming from everywhere will find Twig easier to use. For starters, Twig looks a lot more like HTML, so if you don't know PHP you'll still be right at home. For people who do know PHP and don't know Twig, there will be a learning curve, but it's far far FAR less steep than learning about what Drupal had done to PHPTemplate.
IB: Twig sounds great! What can people do to help make sure it happens for Drupal 8?
JL: There are four main areas where we need help right now, as outlined in our Twig TODO wiki.
1. Help us test all the patches.
2. Help us fix issues with the patches.
3. Help us improve the markup in core (after being converted to Twig).
4. Help us clean up the rest of the theme system.
If people are interested in any one of these four areas, they can come to the sprint immediately following DrupalCon and get some hands-on help making Drupal better. We need all the hands we can get since we are up against some major deadlines, so please please please come help us!
Join Rootwork on Twitter, Facebook and SlideShare.
Learn about Rootwork's services for nonprofits and social change.
PreviousNext: Understanding Drupal 8's Modal API and Dialog Controller
It is common knowledge that Drupal 8 contains Views module, thanks to the work from the Views in Drupal Core (VDC) initiative.
Our contribution to the VDC initiative was working on abstracting Views UI's modal pattern into a generic modal API in core.
Recently one of the coolest pieces of this API was committed to core.
You can now load any content in a modal simply by adding a class and an attribute to any link.
Sound cool? Read on to learn more.
Aten Design Group: A Guide to Finding Aten at DrupalCon PDX
It’s that time of year again—time for DrupalCon. Aten Design Group is headed to Portland and proud to sponsor what is expected to be the largest DrupalCon ever.
Our team is once again involved in many ways, including speaking, content selection and sponsoring after hours events. We’re also bringing our latest event-themed sketchbook and brand new "Work That Matters" posters hot off the press, so don’t forget to come by the Aten booth (#235) to pick some up for yourself.
Start off the week by having fun, meeting interesting people and doing some good at the DoGooders Happy Hour on Monday at 4 PM. We will be getting together with other Drupal community members to benefit one of the community's long-time contributors, Aaron Winborn who has been battling late stage ALS.
After a Tuesday full of sessions, the Opening Reception at 5:30 PM is a perfect time to get a sketchbook and poster at the Aten booth. Then head over to the Women in Drupal Reception at 6 PM, which we are thrilled to support.
On Wednesday at 1 PM, check out Karyn, Scott and the rest of their panel present Making Drupal Meetups & Events Rock in room C123 (Trellon). Then stick around for our lightning talk at 4:15 PM on the Day Stage, Planning and Executing Multiple Projects for Maximum Efficiency and Amazing Results. Justin and I promise to keep it short and sweet.
We've got sessions lined up for Thursday too. Ken will be presenting Design Smarter, Not Harder at 1 PM in OR 203 (Palantir) directly folowed by John and Garrett’s session, Dapper Drupal - Custom Tailored Themes at 2:15 PM in OR 201 (Phase2).
In true DrupalCon fashion, we’ll be sprinting, sprinting, sprinting on Friday. Karyn and others will be mentoring people new to contribution sprints, so everyone can come join the fun.
Commerce Guys: **UPDATED** Project Management Sessions in Portland, Now With Extra Schedule Deliciousness!
** UPDATED ** We're going to live broadcast everything so those who are unable to join in person can still join virtually! Keep tabs on the #pmofs IRC chan and ask your questions (moderated by Don Vandemark) and we'll post the link to view here asap wednesday morning portland time.
Now also posted on Drupalcon Portland website!
The PMoF's Are Happening!
Thank you to everyone who helped us put this together, to the DA (*cough* Holly *cough* Steph) for the fabulous A-V equiped room they're snagging for us, to my fellow PM's for your feedback and ideas and to our presenters who generously offered to show up and do their thang!
Below is the official schedule set for Wednesday 22nd! All those looking for some awesome Project Management content are welcome to join us but it'll be first come first served regarding spots!
starting after the keynote and coffee break!
09:00am Keynote Karen McGrane: Thriving in a world of change: Future-friendly content with Drupal 10:15am Coffee Break in Hall C + D 10:45am The Science of Guessing: Drupal Estimation Techniques from Project Managers
Speakers: Chris Strahl, Jakob Person and Shannon Vettes 12:15pm Fixed-Bid FAILAPALOOZA: Benchmark discussion of failures and solutions 01:00pm How to incrementally integrate QA into Agile
Speakers: Everett Zufelt and Akshay Barve 02:00pm Watergile Pros & Con, A Round Table Discussion 03:00pm Walking Break 03:15pm Agile + Drupal the Four Kitchens Way
Speaker: Todd Nienkerk 04:15pm Agile Workshop & Estimation Techniques: Teaching your team to do agile
Can't wait to see you guys there, start spreading the word!
Tags: project managementagileDrupalConportlandPlanet DrupalCommerce Guys: Project Management Sessions in Portland, Now With Extra Schedule Deliciousness!
The PMoF's Are Happening!
Thank you to everyone who helped us put this together, to the DA (*cough* Holly *cough* Steph) for the fabulous A-V equiped room they're snagging for us, to my fellow PM's for your feedback and ideas and to our presenters who generously offered to show up and do their thang!
Below is the official schedule set for Wednesday 22nd! All those looking for some awesome Project Management content are welcome to join us but it'll be first come first served regarding spots!
starting after the keynote and coffee break!
9am-10:15am Keynote with Karen McGrane
10:15-10:45am Coffee Break
10:45-11:45am Session The Science of Guessing
Chris Strahl, Jakob Person and Shannon Vettes
12:15-1:00pm BoF Fixed-Bid FAILAPALOOZA:
benchmark discussion of failures and solutions!
1:00-2:00pm Session How to incrementally integrate QA into Agile
Everett Zufelt and Akshay Barve
2:00-3:00pm BoF Watergile Pros & Cons
Round Table Discussion
3:00-3:15pm BREAK TIME Y'ALL!!!!!!!
3:15-4:15pm Session Agile + Drupal the Four Kitchens Way
Todd Nienkerk
4:15-5:00pm BoF Agile Workshop & Estimation Techniques
Teaching your team to do agile
Can't wait to see you guys there, start spreading the word!
Tags: project managementagileDrupalConportlandPlanet DrupalFuse Interactive: A Non-Techie’s View on Why You May Want to Leave IE8 Behind Now
Redfin Solutions: Introduction to Series of Posts on Colour.
The idea for this series of posts started at lunch one day when I made an off-hand comment about reading Hex numbers and making fast changes in my CSS file. I am somewhat new to developing for Drupal, but amid all the new information and terminology was something familiar, colour-space*. A sword that I understood how to put to use in elegant arcs within the rest of the coding I was learning.
DrupalCon Portland 2013: Prepaid ticket holders and fellow procrastinators; online registration ends Friday
Prepaid ticket holders, sponsors with unredeemed coupon codes, and any unregistered person looking to not pay the onsite price to attend DrupalCon have just over 24 hours to register before online registration closes this Friday, May 17 at 5:00pm PDT.
tsvenson: We are the Drupaleros
I saw this tweet flashing by in my stream today:
What immediately caught my eye was Drupaleros, the Spanish word for Drupal User. Its such a great word and just sounds great.
Or what do you say about:
We are the Drupaleros!
Awesome isn't it?
Even better, if you know your Spanish it is unisex too.
How about adopting it as the official name for us who are passionate about Drupal?
Lets all be Drupaleros!
Read the full "We are the Drupaleros" post on www.tsvenson.comChapter Three: Helping Tintri revolutionize the VM-aware storage market
To expand and gain a stronger foothold in the VM storage market, Tintri turned to Chapter Three to create a new look and feel for their business. As a team, the two companies built a stronger content structure that spoke more effectively to Tintri’s primary audiences.
The project was a resounding success, resulting in an immediate 30% increase in traffic and a significant uptick in lead generation after just one month.
Chapter Three took us from concept to completion on time and on budget—even though we didn’t have a lot of either. Their process kept the project moving along and still met our iteration expectations. From a site maintenance standpoint, we can now do in a few minutes what used to take hours. We’re ecstatic with our new site and so are our visitors. When I hear from people that have been on the site, their first comment is usually around how easy it is to find what they’re looking for. Great work all around.
- Dave Frederick | Senior Director of Corporate Marketing
Identifying the problem, developing the solution
Tintri, a B2B specializing in VM-aware storage, wanted a new website to better solicit business from larger companies. Their existing Wordpress site looked dated, and it was not instilling confidence in larger customers. It also failed to provide enough flexibility for their communication needs.
We solved Tintri’s problems with a two-pronged approach:
- Improve the visual presentation of the site
- Restructure the site to serve up more relevant content
Improving the visual design
Tintri wanted its website to convey simplicity and efficiency without unnecessary frills or adornments. The company wanted straightforward and consistent communication. Our team approached the design aesthetic from a variety of perspectives until we found the right fit.
As a rapidly-growing startup, Tintrí needed to have a design that could scale along with the business and support a visionary approach. By creating a full-width design, we could reinforce these company attributes with maximum real estate for strong visual messaging.
Leveraging Drupal’s strengths for content strategyTintri’s technical audience prefers consistency and brevity over jargon and fluff. Understanding that site visitors were coming primarily for information, we built ways to showcase nine different kinds of related content on almost every page. With this approach, visitors can find what they are looking for without hunting around or use the search function. It also allows site administrators to create content once, and leverage it multiple times.
Lullabot: Lullabot's goings ons at DrupalCon Portland
Lullabot has always had a big presence at DrupalCon and next week's event in Portland, OR is no exception. We're teaching 4 classes and presenting 10 sessions. We've got 2 booths in the expo hall. We're having a big party on Tuesday night. And nearly the entire Lullabot team will be in Portland. For the latest updates, please follow us on Twitter and like us on Facebook.
Here's the breakdown of where we'll be and when:
Dries Buytaert: Want more features in Drupal 8? Help fix bugs!
In Drupal core, we use issue thresholds to manage technical debt. Both critical (release-blocking) and major (non-release-blocking, high-impact issues) are considered. When we have more open issues than our thresholds, we do not commit new features.
Currently, we have 27 critical bugs, 41 critical tasks, 155 major bugs, and 149 major tasks. This is more than twice our current thresholds for critical issues, and about 50% more than our thresholds for major issues. We need your help to resolve these issues so that we can resume adding new features to Drupal 8. That would be a very exciting place to get to!
There are many ways to help, including not only programming but also updating these issues' summaries, testing the patches, and making sure the patches still apply. I encourage everyone to collaborate on major and critcal issues, and to consider making them a focus at the DrupalCon Portland sprints.
Propeople Blog: Annotations in Drupal 8
There have been a lot of mentioning that Drupal 8 is using Annotations. In this article I will dive in how Drupal uses them and how to leverage Annotations mechanism yourself.
In brief, annotations are blocks of comments that are parsed and used as a source of information about something. For example in Drupal 8, plugins system Annotations are used to describe plugins. They are alternatives to our TYPE_hook_info hooks and are now widely used.
For example:
<?php
/**
* Defines a default processor implementation.
*
* Creates lightweight records from feed items.
*
* @Plugin(
* id = "aggregator",
* title = @Translation("Default processor"),
* description = @Translation("Creates lightweight records from feed items.")
* )
*/
class DefaultProcessor extends PluginBase implements ProcessorInterface {
}
?>
How does this work technically?
For parsing annotations Drupal uses AnnotationReader class from Doctrine. This class can retrieve annotations from classes, class methods in the following way: <?php
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\Common\Reflection\StaticReflectionParser;
$object = new CustomClassWithAnnotations();
$annotation_name = 'Drupal\custom_module\Annotation\CustomAnnotation';
$reader = new AnnotationReader();
// Register the namespaces of classes that can be used for annotations.
$annotation_namespaces = array(
'Drupal\custom_module\Annotation' => DRUPAL_ROOT . '/modules/custom_module/lib',
);
AnnotationRegistry::registerAutoloadNamespaces($annotation_namespaces);
$reflection_class = new StaticReflectionClass($object);
$annotation = $reader->getClassAnnotation($reflection_class, $annotation_name);
?>
In the example above $annotation will be an object - instance of class that is registered as annotation. For example in case of:
<?php
/**
* @CustomAnnotation(
* property1 = "value1",
* property2 = “value2”,
* )
class CustomClassWithAnnotations() {
} ?>
AnnotationReader will check if it understands the CustomAnnotation class and instantiates it. In order the reader to understand this annotation, we should register it with AnnotationRegistry.
How do we define the CustomAnnotation class? A good idea would be to inherit it from – Drupal\Component\Annotation\Plugin. It will parse annotation to an array that you can access the "get()" method $definition = $annotation->get();
Defining a new type of annotation can be done in the following way:
<?php
namespace Drupal\custom_module\Annotation;
use Drupal\Component\Annotation\Plugin;
/**
* Defines an CustomAnnotation annotation type.
*
* @Annotation
*/
class CustomAnnotation extends Plugin {
}
?>
Of course you can skip creating a new type of annotation and use @Plugin instead.
In Drupal, the primary usage of annotations is in AnnotatedClassDiscovery, to discover plugins. But we can go further and apply reading annotations from class methods:
<?php
$reflection_method = new \ReflectionMethod('CustomClassWithAnnotations', $method_name);
$annotation = $this->reader->getMethodAnnotation($reflection_method, 'Drupal\custom_module\Annotation\CustomAnnotation');
?>
We can use this for example for validation of arguments or even unit testing our methods (providing a set of arguments and results to test against).
Hope this article made it a bit clearer about annotations. If you need some help on annotations we will be glad to assist you on Facebook or Twitter.
You may also share your thoughts/comments below.
For further reading:
Declarative development using annotations in PHP
Using annotations in PHP with doctrine annotation reader
Use Annotations for plugin discovery
Acquia: Sign up for free Drupal for project managers - mini-course
Are you a project manager working for a company adopting Drupal? Are you new to managing Drupal projects? This course is the right one for you!
This course follows the life cycle of a Drupal project from start to finish and back again and is based on our full day Drupal for Project Manager’s course.