NodeUtil.php
33 * @param $otherRole The role of the type at the other end (maybe null, if only type shoudl match)
60 * @param $otherRole The role of the type at the other end (maybe null, if only type shoudl match)
91 $otherTypeFq = $otherType != null ? $persistenceFacade->getFullyQualifiedType($otherType) : null;
92 if (($otherRole != null && $nextRole == $otherRole) || ($otherType != null && $nextType == $otherTypeFq)) {
101 self::getConnectionsImpl($nextType, $otherRole, $otherType, $hierarchyType, $result, $nextCurrentPath);
147 * Example: 'name,text' shows the name of the Node together with the content of the text attribute
149 * @param $language The language if values should be localized. Optional, default is Localization::getDefaultLanguage()
157 * Does the same as NodeUtil::getDisplayValue but returns the display values as associative array
159 * @param $language The language if values should be localized. Optional, default is Localization::getDefaultLanguage()
266 public static function translateValue(PersistentObject $object, $valueName, $language, $itemDelim=", ") {
269 $value = ValueListProvider::translateValue($value, $object->getValueProperty($valueName, 'input_type'), $language, $itemDelim);
getMapper()
Definition: DefaultPersistentObject.php:123
static makeNodeUrlsRelative(Node $node, $baseUrl, $recursive=true)
Make all urls matching a given base url in a Node relative.
Definition: NodeUtil.php:202
static getConnections($type, $otherRole, $otherType, $hierarchyType='all')
Get the shortest paths that connect a type to another type.
Definition: NodeUtil.php:39
static getDisplayValue(Node $node, $language=null)
Get the display value for a Node defined by the 'displayValues' property.
Definition: NodeUtil.php:152
NodeValueIterator is used to iterate over all persistent values of a Node (not including relations).
Definition: NodeValueIterator.php:43
static getConnectionsImpl($type, $otherRole, $otherType, $hierarchyType, array &$result=[], array $currentPath=[])
Get the relations that connect a type to another type.
Definition: NodeUtil.php:67
static getDisplayValues(Node $node, $language=null)
Does the same as NodeUtil::getDisplayValue but returns the display values as associative array.
Definition: NodeUtil.php:162
static asValue($operator, $value)
Factory method for constructing a Criteria that may be used as value on a PersistentObject's attribut...
Definition: Criteria.php:58
static removeNonPkValues(Node $node)
Remove all values from a Node that are not a primary key value.
Definition: NodeUtil.php:292
StringUtil provides support for string manipulation.
Definition: StringUtil.php:18
setValue($name, $value, $forceSet=false, $trackChange=true)
Set the value of an attribute if it exists.
Criteria defines a condition on a PersistentObject's attribute used to select specific instances.
Definition: Criteria.php:21
static translateValues(&$nodes, $language=null, $itemDelim=", ")
Translate all list values in a list of Nodes.
Definition: NodeUtil.php:249
getValueProperty($name, $property)
Get the value of one property of an attribute.
ValueListProvider provides lists of key/values to be used with list input controls.
Definition: ValueListProvider.php:23
static translateValue(PersistentObject $object, $valueName, $language, $itemDelim=", ")
Translate a PersistentObject list value.
Definition: NodeUtil.php:266
static removeNonDisplayValues(Node $node)
Remove all values from a Node that are not a display value.
Definition: NodeUtil.php:278
static getInstance($name, $dynamicConfiguration=[])
Definition: ObjectFactory.php:47
getProperty($name)
Definition: DefaultPersistentObject.php:486
PersistentObject defines the interface of all persistent objects.
Definition: PersistentObject.php:23
static getRelationQueryCondition($node, $otherRole)
Get the query condition used to select all related Nodes of a given role.
Definition: NodeUtil.php:117
getOID()
Definition: DefaultPersistentObject.php:133
ObjectFactory implements the service locator pattern by wrapping a Factory instance and providing sta...
Definition: ObjectFactory.php:24
PathDescription describes a path between two types.
Definition: PathDescription.php:18
static translateValue($value, $inputType, $language=null, $itemDelim=", ")
Translate a value with use of it's assoziated input type e.g.
Definition: ValueListProvider.php:84
ObjectQuery implements a template based object query.
Definition: ObjectQuery.php:106