@param string $publicationUuid
@param mixed  $data

@throws PublicationException
439404
public function delete($publicationUuid, $data)
    {
        $url = $this->url.'/'.$publicationUuid;
        $response = $this->restClient->delete($url, $this->options);
        $this->checkError($response, 'DELETE', $url);
    }
1104661
public function registeredonhublisting($courseid, $publications) {
        global $CFG;
        $table = new html_table();
        $table->head = array(get_string('type', 'hub'),
            get_string('date'), get_string('status', 'hub'), get_string('operation', 'hub'));
        $table->size = array('20%', '30%', '%20', '%25');

        $brtag = html_writer::empty_tag('br');

        foreach ($publications as $publication) {

            $params = array('id' => $publication->courseid, 'publicationid' => $publication->id);
            $cancelurl = new moodle_url("/course/publish/index.php", $params);
            $cancelbutton = new single_button($cancelurl, get_string('removefromhub', 'hub'));
            $cancelbutton->class = 'centeredbutton';
            $cancelbuttonhtml = $this->output->render($cancelbutton);

            if ($publication->enrollable) {
                $params = array('sesskey' => sesskey(), 'id' => $publication->courseid, 'publicationid' => $publication->id);
                $updateurl = new moodle_url("/course/publish/metadata.php", $params);
                $updatebutton = new single_button($updateurl, get_string('update', 'hub'));
                $updatebutton->class = 'centeredbutton';
                $updatebuttonhtml = $this->output->render($updatebutton);

                $operations = $updatebuttonhtml . $brtag . $cancelbuttonhtml;
            } else {
                $operations = $cancelbuttonhtml;
            }

            // If the publication check time if bigger than May 2010, it has been checked.
            if ($publication->timechecked > 1273127954) {
                if ($publication->status == 0) {
                    $status = get_string('statusunpublished', 'hub');
                } else {
                    $status = get_string('statuspublished', 'hub');
                    if (!empty($publication->link)) {
                        $status = html_writer::link($publication->link, $status);
                    }
                }

                $status .= $brtag . html_writer::tag('a', get_string('updatestatus', 'hub'),
                        array('href' => $CFG->wwwroot . '/course/publish/index.php?id='
                            . $courseid . "&updatestatusid=" . $publication->id
                            . "&sesskey=" . sesskey())) .
                    $brtag . get_string('lasttimechecked', 'hub') . ": "
                    . format_time(time() - $publication->timechecked);
            } else {
                $status = get_string('neverchecked', 'hub') . $brtag
                    . html_writer::tag('a', get_string('updatestatus', 'hub'),
                        array('href' => $CFG->wwwroot . '/course/publish/index.php?id='
                            . $courseid . "&updatestatusid=" . $publication->id
                            . "&sesskey=" . sesskey()));
            }
            // Add button cells.
            $cells = array($publication->enrollable ?
                get_string('advertised', 'hub') : get_string('shared', 'hub'),
                userdate($publication->timepublished,
                    get_string('strftimedatetimeshort')), $status, $operations);
            $row = new html_table_row($cells);
            $table->data[] = $row;
        }

        $contenthtml = html_writer::table($table);

        return $contenthtml;
    }
684603
private void publishToRepository(String attributeName, String attributeType, Object oldValue, Object newValue) {
        super.sendNotification(new AttributeChangeNotification(
                        this,
                        sequenceNum.incrementAndGet(),
                        System.currentTimeMillis(),
                        "",
                        attributeName,
                        attributeType,
                        oldValue,
                        newValue));
    }
862765
public function updateElement($listUuid, $elementUuid, $data)
    {
        $numberOfChunks = $this->getNumberOfChunks($listUuid);
        $ttl = ($this->getTtl($listUuid) > 0) ? $this->getTtl($listUuid) : null;

        for ($i = 1; $i <= $numberOfChunks; ++$i) {
            $chunkNumber = $listUuid.self::SEPARATOR.self::CHUNK.'-'.$i;
            $chunk = $this->memcached->get($chunkNumber);

            if (array_key_exists($elementUuid, $chunk)) {
                $listElement = $this->findElement(
                    (string) $listUuid,
                    (string) $elementUuid
                );

                $updatedElementBody = $this->updateListElementBody($listElement, $data);
                if (!ListElementConsistencyChecker::isConsistent($updatedElementBody, $this->findListByUuid($listUuid))) {
                    throw new ListElementNotConsistentException('Element '.(string) $elementUuid.' is not consistent with list data.');
                }

                $arrayOfElements = $this->memcached->get($listUuid);
                $updatedElement = new ListElement(
                    new ListElementUuid($elementUuid),
                    $updatedElementBody
                );
                $body = $updatedElement->getBody();
                $arrayOfElements[(string) $elementUuid] = $body;

                $this->memcached->replace(
                    (string) $chunkNumber,
                    $arrayOfElements,
                    $ttl
                );

                break;
            }
        }
    }
730731
public function handlePublishPageNumber(PublishEvent $event)
    {
        $document = $event->getDocument();
        $node = $event->getNode();
        $propertyName = $this->propertyEncoder->systemName(static::FIELD);
        if (!$document instanceof PageBehavior) {
            return;
        }

        $node->setProperty($propertyName, $document->getPageNumber());
    }
785635
function onPublish( $contentObjectAttribute, $contentObject, $publishedNodes )
    {
        eZDebug::writeDebug( 'Start', __METHOD__ );
        $paex = $contentObjectAttribute->content();
        if ( !$paex instanceof eZPaEx )
        {
            return true;
        }

        // Update empty paex data from parent paex
        // NOTE: if the current user don't have permission to edit paex data, and is
        // creating a new object (publishing version 1), force paex object update
        // to get values set in parent
        if ( !$paex->canEdit() && $contentObject->attribute( 'current_version' ) == 1 )
            $paex->updateFromParent( true );
        else
            $paex->updateFromParent();

        eZDebug::writeDebug( 'End', __METHOD__ );
        return true;
    }
532245
public function write($id, $data)
    {
        try {
            return $this->db->write($id, $data);
        } catch (\Exception $e) {
            throw $e;
        }
    }
829320
public function pub($topic, $data, $excludeUids = [])
    {
        Utility::CheckTopicName($topic);
        ProcessManager::getInstance()->getRpcCall(ClusterProcess::class, true)->my_pub($topic, $data, $excludeUids);
    }
956984
public function createPost($authorId, array $data)
    {
        $requestData = [
            'form_params' => $data,
        ];

        return $this->client->makeRequest('POST', 'users/' . $authorId . '/posts', $requestData);
    }
34371
private function persistDocument($data, $document, $locale, $articleUuid)
    {
        if (array_key_exists('title', $data)) {
            throw new ParameterNotAllowedException('title', get_class($document));
        }

        $article = $this->getDocumentManager()->find($articleUuid, $locale);

        if (!array_key_exists('template', $data)) {
            $data['template'] = $article->getStructureType();
        }

        $formType = $this->getMetadataFactory()->getMetadataForAlias('article_page')->getFormType();

        $form = $this->createForm(
            $formType,
            $document,
            [
                // disable csrf protection, since we can't produce a token, because the form is cached on the client
                'csrf_protection' => false,
            ]
        );
        $form->submit($data, false);

        $document->setParent($article);

        if (!$form->isValid()) {
            throw new InvalidFormException($form);
        }

        $this->getDocumentManager()->persist(
            $document,
            $locale,
            [
                'user' => $this->getUser()->getId(),
                'clear_missing_content' => false,
                'auto_name' => false,
                'auto_rename' => false,
            ]
        );
    }
462307
private void publishEvent(WSJobExecution jobEx, String topicToPublish, String correlationId) {
        if (eventsPublisher != null) {
            eventsPublisher.publishJobExecutionEvent(jobEx, topicToPublish, correlationId);
        }
    }
132164
function publish(loc, data) {
  data = data || {};
  data.clientID = clientID;
  fayeClient.publish(loc, data);
}
342323
static function executePublish( $contentObjectID, $contentObjectVersion )
    {
        $functionName = 'publish';
        $params = array( $contentObjectID, $contentObjectVersion );

        self::executeHandlerFunction( $functionName, $params );
    }
765459
@Override
  protected void publishData(WorkUnitState state, int branchId, boolean publishSingleTaskData,
      Set<Path> writerOutputPathsMoved) throws IOException {
    Path publisherOutputDir = getPublisherOutputDir(state, branchId);
    if (!this.publisherFileSystemByBranches.get(branchId).exists(publisherOutputDir)) {
      WriterUtils.mkdirsWithRecursivePermissionWithRetry(this.publisherFileSystemByBranches.get(branchId),
          publisherOutputDir, this.permissions.get(branchId), this.retrierConfig);
    }
    super.publishData(state, branchId, publishSingleTaskData, writerOutputPathsMoved);
  }
471243
private function handlePublishUid(ConnectionInterface $from, $data) {
    $this->logger->notice(
        "Received a UID publish! (".
          (
            isset($data['name'])
                ? $data['name']
                : "{$data['oldName']} => {$data['newName']}"
          ).
          ", {$data['event']}, {$from->resourceId})"
    );

    foreach ($data as $key => $name) {
      if (!in_array($key, ['name', 'newName', 'oldName'])
          || !key_exists($name, $this->uidSubs)) {
        continue;
      }
      foreach ($this->uidSubs[$name] as $curClient) {
        $this->logger->notice(
            "Notifying client of {$data['event']}! ".
              "($name, {$curClient->resourceId})"
        );
        $payload = [
          'uid' => $name,
          'event' => $data['event']
        ];
        if (isset($data['value'])) {
          $payload['value'] = $data['value'];
        }
        $curClient->send(json_encode($payload));
      }
    }
  }
1194139
public void publish() {
        /*
         * Some care is required here to correctly swap the DataBuffers,
         * but not hold the synchronization object while compiling stats
         * (a potentially long computation).  This ensures that continued
         * data collection (calls to noteValue()) will not be blocked for any
         * significant period.
         */
        DataBuffer tmp = null;
        Lock l = null;
        synchronized (swapLock) {
            // Swap buffers
            tmp = current;
            current = previous;
            previous = tmp;
            // Start collection in the new "current" buffer
            l = current.getLock();
            l.lock();
            try {
                current.startCollection();
            } finally {
                l.unlock();
            }
            // Grab lock on new "previous" buffer
            l = tmp.getLock();
            l.lock();
        }
        // Release synchronizaton *before* publishing data
        try {
            tmp.endCollection();
            publish(tmp);
        } finally {
            l.unlock();
        }
    }
543155
private function handlePublish(ConnectionInterface $from, $msg, $data) {
    if (isset($data['guid'])
        && (
          $data['event'] === 'delete'
          || (
            isset($data['entity'])
            && ($data['event'] === 'create' || $data['event'] === 'update')
          )
        )
      ) {
      // Publish is an entity.

      // Relay the publish to other servers.
      $this->relay($msg);

      $this->handlePublishEntity($from, $data);
    }

    if ((
          isset($data['name'])
          || (isset($data['oldName']) && isset($data['newName']))
        )
        && in_array(
            $data['event'],
            ['newUID', 'setUID', 'renameUID', 'deleteUID']
        )
      ) {
      // Publish is a UID.

      // Relay the publish to other servers.
      $this->relay($msg);

      $this->handlePublishUid($from, $data);
    }
  }