plugin/exo/Manager/Item/ItemManager.php
public function refreshIdentifiers(Item $item)
    {
        // refresh self id
        $item->refreshUuid();

        // refresh objects ids
        foreach ($item->getObjects() as $object) {
            $object->refreshUuid();
        }

        // refresh hints ids
        foreach ($item->getHints() as $hint) {
            $hint->refreshUuid();
        }

        if (1 === preg_match('#^application\/x\.[^/]+\+json$#', $item->getMimeType())) {
            // it's a question
            $definition = $this->itemDefinitions->get($item->getMimeType());
        } else {
            // it's a content
            $definition = $this->itemDefinitions->get(ItemType::CONTENT);
        }

        $definition->refreshIdentifiers($item->getInteraction());
    }
public function refreshIdentifiers(Item $item)
    {
        // refresh self id
        $item->refreshUuid();

        // refresh objects ids
        foreach ($item->getObjects() as $object) {
            $object->refreshUuid();
        }

        // refresh hints ids
        foreach ($item->getHints() as $hint) {
            $hint->refreshUuid();
        }

        if (1 === preg_match('#^application\/x\.[^/]+\+json$#', $item->getMimeType())) {
            // it's a question
            $definition = $this->itemDefinitions->get($item->getMimeType());
        } else {
            // it's a content
            $definition = $this->itemDefinitions->get(ItemType::CONTENT);
        }

        $definition->refreshIdentifiers($item->getInteraction());
    }
public function refreshIdentifiers ( Item $ item ) { // refresh self id $ item -> refreshUuid ( ) ; // refresh objects ids foreach ( $ item -> getObjects ( ) as $ object ) { $ object -> refreshUuid ( ) ; } // refresh hints ids foreach ( $ item -> getHints ( ) as $ hint ) { $ hint -> refreshUuid ( ) ; } if ( 1 === preg_match ( '#^application\/x\.[^/]+\+json$#' , $ item -> getMimeType ( ) ) ) { // it's a question $ definition = $ this -> itemDefinitions -> get ( $ item -> getMimeType ( ) ) ; } else { // it's a content $ definition = $ this -> itemDefinitions -> get ( ItemType :: CONTENT ) ; } $ definition -> refreshIdentifiers ( $ item -> getInteraction ( ) ) ; }
Generates new UUIDs for the entities of an item.

@param Item $item
Generates new UUIDs for the entities of an item .