Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for array-data in content #334

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rommelfreddy
Copy link

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.

return $this->_getData(NodeInterface::CONTENT);
$content = $this->_getData(NodeInterface::CONTENT);

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

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