butler's Introduction
You can find the design decisions relating to this module at http://groups.drupal.org/butler. The butler module intends to provide a unified context for Drupal, through a single context object. The context object can be retrieved by calling butler_context(), but it is preferable to be passed a context object, or pass others the context object. To get a piece of contextual information, simply call ->get() on the context object with the "selector". The selector is a multi-layer selector pointing to the specific contextual item. For example, `http:get:q` will fetch the parameter `q` from the query string, and `node` will fetch the current node. Additional context may be declared in two ways: statically or dynamically. To declare the context statically, one may implement hook_butler(), returning a simple mapping of `selector` => `class name`. The selector may be any number of levels deep. To add to / change the context dynamically, you can call `->set()` on the context object. The first parameter is the selector, which can be any number of levels deep (you can, for example, override just `http:get:q`, or all of `http`). The second parameter can either be an object, in which case the ->get method is called to retrieve the context, or a static data type (string, int, float, array), in which case the selector is directly mapped to that value.
butler's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.