\NLInlineLayout
Synopsis
class NLInlineLayout
extends NLLayoutComponent
{
- // Inherited members from NLComponent
- protected $children;
- protected $rawBindings;
- protected $bindings;
- protected $bindingValues;
- protected $layoutValues;
- protected $view $view;
- // methods
- public static void get_metadata()
- public void containerClasses()
- public void renderContent()
- // Inherited methods from NLLayoutComponent
- public void maxChildren()
- public void containerClasses()
- // Inherited methods from NLComponent
- public static void factory()
- public static array get_metadata()
- public void getMetadataValue()
- public void getMetadata()
- protected void getProperties()
- protected map getBindingDefinitions()
- public ViewableData getBindingValues()
- public getLayoutValues()
- public string render()
- public void getChildren()
- public abstract string renderContent()
- protected array containerClasses()
- public void maxChildren()
Hierarchy
Extends
Members
protected
- $bindingValues
—
null
This maps properties to actual values to be rendered. - $bindings
—
null
This holds the binding definitions that are stored in the component. i.e. it identifies the source of values per property, but not the actual value. - $children
—
null
If the component type supports child components, they are represented in an array here. - $layoutValues
—
null
An object that holds the layout properties for the component. It is initialised in the constructor from the raw object passed in. - $rawBindings
- $view
—
$view
A reference to the view object.
Methods
public
Inherited from NLLayoutComponent
public
Inherited from NLComponent
protected
- containerClasses() — This function can be overridden by subclasses to provide additional CSS classes to add to the component's containment markup. Generally treated as additive, if a subclass overrides this, it should also add the classes of the parent. The classes are made unique before being rendered.
- getBindingDefinitions() — Return the binding definitions, mapping properties to where they get values from. This comes from the raw bindings, and is processed on demand and stored into $this->bindings.
- getProperties() — Shorthand form of getting properties, which comes from metadata structure.
public
- factory() — Given an NLComponent object hierarchy, generate the actual NLComponent instances. The object passed in is an object structure that is a deserialised json object, so the objects are untyped. We use the ClassName property in each to determine the actual type. Bindings are done lazily; the component only interprets the binding definitions in $object later if it needs to.
- getBindingValues()
- getChildren()
- getLayoutValues() — Return the layout values. These are stored in the serialised object, and managed by the parent. This is a raw object that can have any properties set by the layout manager. If there is no layout object defined, a new stdClass object is returned, so the call doesn't have to check if its null or not.
- getMetadata() — Return the metadata array, which is derived from get_metadata but includes inheriting properties from the parent.
- getMetadataValue()
- get_metadata() — Return a map of metadata properties about this component type. Every component class should define this method. Not all properties need to be defined for each component type. getMetadataCombined can be used to get metadata values, with properties inherited up the component hierarchy.
- maxChildren() — Return the maximum number of children allowed for this type of component. Subclasses can override it.
- render() — render() generates the HTML for the component, including generic containment. Generally subclasses shouldn't override this, but will override renderContent. The parent component (typically layout components) can provide extra properties that affect the containment.
- renderContent() — renderContent generates the HTML that goes inside the generic component containment. Subclasses need to override this.