Do not bargain with objects or listen to animals, because if they are possessed they cannot be trusted.
Validates email addresses whereever they occur:
* Drupal registration
* Email field.
With config_devel, when you are editing a migration, you can just enter the name of the file being edited at admin/config/config_devel and on every request the module will check for changes and import the file into the active storage. The other direction works as well: say you are working on a contrib module and have a view. Provide the path of the file (this time in the auto export box) and on every change Drupal will automatically export. Once satisfied, just commit. Or perhaps you just want to follow what's in a config file as it's being edited -- provide sites/default/files/some.config.name.yml and it'll be right there on every save.
Both import and export are doable manually with the config module core provides. But I think the automatism makes life easier and I hope the module will be popular among D8 developers. Finally, let me thank beejeebus for cooking up the module originally and handing it over to me despite he knew I will rewrite it from the ground up.
First, we had drush_ecl (which is exclusively a drush plugin). Now, we'll have ECL. This is for those that want an actual module to integrate into their drupal project for loading entities into caches.
Even though Drupal 7 core fell short of a proper way of handling its brand new entity system (we currently rely on the great Entity module for that), it did give us EntityFieldQuery. For those of you who don’t know, EntityFieldQuery is a very powerful querying class used to search Drupal entities programatically (nodes, users, etc).
It provides a number of methods that make it easy to query entities based on conditions such as field values or class properties. If you don’t know how it works, feel free to check out this documentation page or this great tutorial on the subject.
In this article I am going to talk about what we have in Drupal 8 for querying entities. There is no more EntityFieldQuery, but there’s an entity.query service that will instantiate a query object for a given entity type (and that implements the \Drupal\Core\Entity\Query\QueryInterface). We can access this service statically through the \Drupal namespace or using dependency injection.
First up, we’ll look at querying node entities and then we’ll see how to load them. The same techniques will work with other content entities as well (users, comments etc), but also with configuration entities, and that’s really cool.The entity query service
As mentioned, there are two ways we can access the entity.query service that we use for querying entities. Statically, we can do this:
Continue reading %The Drupal 8 version of EntityFieldQuery%
Originally published at: http://diehardgamefan.com/2014/06/22/tabletop-review-dungeon-crawl-classicsmaximum-xcrawl-free-rpg-day-2014/
This year, Goodman Games’ Free RPG Day offering consists of not one, but TWO adventures for lucky gamers. Dungeon Crawl Classics fans get Elzemon and the Blood Drinking Box while Xcrawl fans get Dungeons Detonation 2014. This is my first exposure to Xcrawl, so I can’t speak to what the game was like before it moved over to Pathfinder mechanics, but it does mean that fans of 3.5 style gaming get two different adventures for their gaming group this year.
Our DCC adventure is only five pages long plus a full page piece of art and the usual (awesome) Doug Kovacs map. This means the adventure is a quick one that can be played in only a single session and also that Xcrawl is the main draw in this year’s twofer. Elzemon and the Blood Drinking Box is for seven to nine 1st Level characters and consists of a seven piece dungeon crawl. This particular adventure sees the PCs hired by the wizard, Rhalabhast of Many Eyes, to steal an artifact known as Yarafad’s Box. The box requires the regular feeding (5 HP per day) of Lawful aligned blood or it will lose a horrific monster upon the world. Of course the mission isn’t THAT straightforward, and there are some definite complications along the way, both physically and mentally. The adventure lasts roughly five days and besides the usual horrors that come from a hack and slash dungeon, there is a more cerebral element to the entire affair that the PCs may never become wise to. Players will also have to solve puzzles, fight off strange and sinister creatures that should not be and, of course, obtain Yarafad’s box. It’s a pretty straightforward adventure, save for the climatic plot twist, and as such it’s a great way to introduce gamers to the mechanics and atmosphere of Dungeon Crawl Classics. You also have two possible endings, one of which may spur the GM on to do several follow up adventures based off of revenge attempts upon the PCs. Not a bad little affair in all.
As Xcrawl takes up two thirds of the Free RPG Day offering, we will spend most of our time with that. Again, this is my first exposure to Xcrawl so I can’t comment on what it was like before the conversion over to Pathfinder, but I know Pathfinder pretty well, I feel comfortable commenting on the adventure even whilst admitting my ignorance of the overall setting.
From what I can tell, Xcrawl is a comedy-adventure, almost American Gladiators or The Running Man sort of affair, where player characters are celebrity entertainers of sorts. Smash T.V. is a nother good example for you old school video game fans. That doesn’t make the dangers or threat of death any less real though. The adventure, Dungeon Detonation 2014 is for characters between Levels 6-8, but there is no mention of a suggested party size. The idea of the adventure is that the PCs have agreed to take part in an Xcrawl for charity, giving them some nice public exposure and raise money for a good cause.
The dungeon in this adventure is a single level, but as Xcrawl is an entertainment/sport type of deal, the PCs won’t be the only party taking part. There will be five teams in all trying to make it through the dungeon, but it will be successively, not all at once. That’s too much chaos for all but the best GMs to deal with. For each piece of treasure the PCs collect, an equal piece will be donated to the “Jose Villalobos House for War Widows and Orphans. ” PCs will have to collect the most treasure and survive the most encounters to win.
What I found interesting is that Xcrawl takes place is a fantasy version of our real world, similar to how Shadowrun does, although Xcrawl has a fantasy bent instead of a Sci-Fi one. I think players will either really like or really hate this, depending on how serious they take their gaming. Me? I like to laugh personally, so I enjoyed the somewhat farcial nature of this piece.
Xcrawl isn’t the most well known gaming setting, so it was a wise idea to pare it with Pathfinder since that’s one of the most popular tabletop RPGs right now. You also get a half page of glossary and vernacular specific to Xcrawl to help new players and GMs alike become comfortable with the setting. The adventure also gives you a sidebar a few pages in (it probably should have been right up front) explaining a quick overview on how Xcrawl works, setting and mechanics wise. So even though this is a bit of an obscure game compared to a lot of Free RPG Day 2014 offerings, it should be an easy adventure to figure out and have fun with.
The dungeon itself is actually pretty long, with over a dozen rooms. Of course not every room has traps or monsters to best. Aside from the specific Xcrawl trappings, it’s a pretty standard hack and slash affair. Truly though, it’s the uniqueness of the Xcrawl experience that makes this adventure both fun and memorable. Of course, that could just be because I’m viewing this as a one-shot. I’m not sure that I’d enjoy a full length campaign of this nature. It’s like HoL – this type of adventure is best served as small treats rather than something you play regularly. Overall, I though Dungeon Detonation was very well done. I laughed at the absurd nature of the piece and I also enjoyed this variant on the usual Pathfinder style hack and slash experience. It’s definitely an adventure to try, but the overall campaign setting will definitely be for a niche audience.
All in all, another Free RPG Day gives us another quality offering from Goodman Games. If you missed out on this year’s release, it will probably make it out as a PDF to the general public at some point, so don’t feel too bad if you live far away from a brick and mortar store. Packaging both pieces as a “twofer” ensures gamers who pick this get two adventures for two different systems and thus gives Goodman Games a better chance of gaining a new fan. After all, someone might be a diehard Pathfinder fan and thus will be able to play (and hopefully enjoy) Xcrawl thus giving them impetus to pick up Maximum Xcrawl (The Pathfinder variant) core rulebook once it is released. Same with DCC. That still may appeal to a gamer like myself, who generally doesn’t care for Pathfinder or D and D 3.0/3.5. Both adventures are very different in tone and mechanics, so there should be something for everyone but the devout sci-fi gamer to enjoy with this release.
Here’s a little history I pieced together about, Drupal, the Views module and the human condition.
It must have been 4 years or so ago that the new Field API for D7 crystallises, requiring modifications to Views. So someone adds lines of code to make this happen. They don’t think much about those lines or the performance impact these may have. They don’t put a “hook” in to allow developers to alter the behaviour of those lines. Why would they? It’s a pretty trivial change. In fact it never crosses their minds to add the CPU cycles spent by that code to the view's performance stats.
4 years go by.
Nobody is aware that if you piled up the seconds collectively wasted in that code across all Drupal sites using Views over a period of 4 years, it would amount to like,…. like higher than the Eiffel tower. So to speak…
Until a couple of weeks ago some RdeBoer employs XHProf to find out why a client’s site is a little sluggish. And he finds those lines of code. And although there’s no hook as such to bypass those lines, he finds a way without hacking the Views module to neutralise those lines, offering a simple switch on the UI. Like a Turbo button, it makes selected Views run faster.
The customer is delighted. Now their site is finally speedy enough to go live! Another client quotes the results as “amazing”.
Encouraged by the happy customers RdeBoer tarts up his module to share it with the Drupal community. Now everyone can enjoy similar speed improvements. He writes a little blog post about it.
In a comment to that post @merlinofchaos confirms that those lines were indeed added with the introduction of the Field API. And that not showing how much time is spent in those lines is an oversight.
RdeBoer smiles. Takes a sip of his wine. 4 years... Isn’t life funny?
@merlinofchase goes back to the garden and throws another shrimp on the barbie. Metaphorically speaking. Might have been chicken. Have you seen Earl’s chicken? The photo above that’s his chicken. He cooked that last week. I would love a bit of that chicken. With its juices dripped over the veggies. Yummo!
Meanwhile @someViewsDude has a not-so-constructive go via Twitter, email and the module’s issue queue ...
My friend and colleague Susan concludes her writings with a beautiful phrase: “Breathe and do the next right thing”.
Maybe we can all sit around Earl's barbie. Try his chicken. It looks delish.