The Web Services and Context Core Initiative (WSCCI) aims to transform Drupal from a first-class CMS to a first-class REST server with a first-class CMS on top of it. To do that, we must give Drupal a unified, powerful context system that will support smarter, context- sensitive, easily cacheable block-centric layouts and non-page responses using a robust unified plugin mechanism.
function drupal_container(ContainerBuilder $reset = NULL) { static $container = NULL; if (isset($reset)) { $container = $reset; } elseif (!isset($container)) { $container = new ContainerBuilder(); } return $container; }
$langcode = drupal_container()->get('language_interface')->langcode;
Now we can inject the language as we move other things into the container.
Eventually remove the wrapper function and inject all the things!
Benefits
Limitations
function mymodule_node_access($node, $op, $account) { if ($op == 'edit' && $node->uid == $account->uid && $node->created > (REQUEST_TIME - 3600)) { return NODE_ACCESS_ALLOW; } return NODE_ACCESS_IGNORE; }
$return = module_invoke_all('node_access', $node, 'update', $account);
Prediction (warning, I know better than to gamble):
Benefits
Drawbacks
We must get rid of these Arrays of Doom.
Maybe!
Benefits
Drawbacks
We could use a hand!
Larry "Crell" Garfield | Kernel, Routing, Web services | |
Kris "EclipseGc" Vanderwater | ESI-based page layout | |
Rob Loach | Dependency Injection | |
Jen Lampton | Twig | |
Greg "heyrocker" Dunlap | YAML, Configuration |
drupal_set_message()
Response::prepare()
chaining