Skip to content

add support for array-data in content#334

Open
rommelfreddy wants to merge 1 commit intoSnowdogApps:developfrom
rommelfreddy:task/content-array
Open

add support for array-data in content#334
rommelfreddy wants to merge 1 commit intoSnowdogApps:developfrom
rommelfreddy:task/content-array

Conversation

@rommelfreddy
Copy link
Copy Markdown

with this PR it is possible to store arrays within the content-field of the Node-Entity.

This is useful if it is required to store more information, than a single string.

this helps developer to have structured data, which has not be converted from and to json manually.

Comment thread Model/Menu/Node.php
return $this->_getData(NodeInterface::CONTENT);
$content = $this->_getData(NodeInterface::CONTENT);

if (strpos($content, '{') === 0 && strpos($content, '}') === strlen($content) - 1) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$content is not always a string, when _getData() returns null this will throw an error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants