Skip to content

Instantly share code, notes, and snippets.

@factoryhr
Created February 17, 2020 11:53
Show Gist options
  • Save factoryhr/881e5aeb825255b82a0797bf71268ee1 to your computer and use it in GitHub Desktop.
Save factoryhr/881e5aeb825255b82a0797bf71268ee1 to your computer and use it in GitHub Desktop.
$tag = new \Pimcore\Model\Element\Tag();
$tag->setName(‘keyword’)->save();
\Pimcore\Model\Element\Tag::addTagToElement(‘object’, 156, $tag);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment