private function initPropertyChain($value) { $chain = explode('.', $value); // Get the last which represents the final output // Foo.Bar.Foobar.Baz $last = array_pop($chain); $this->lastPropertyChainValue = PropertyValue::makeUserProperty($last); if (!$this->lastPropertyChainValue->isValid()) { return $this->addError($this->lastPropertyChainValue->getErrors()); } $this->lastPropertyChainValue->setOptions($this->getOptions()); // Generate a forward list from the remaining property labels // Foo.Bar.Foobar foreach ($chain as $value) { $propertyValue = PropertyValue::makeUserProperty($value); if (!$propertyValue->isValid()) { continue; } $propertyValue->setOptions($this->getOptions()); $this->propertyValues[] = $propertyValue; } }