Returns the content name.

@param int|string $contentId

@return string
777089
public function getContentName($contentId): string
    {
        try {
            $versionInfo = $this->loadVersionInfo($contentId);

            return $versionInfo->getName() ?? '';
        } catch (Throwable $t) {
            return '';
        }
    }
211835
public function mapContentById($contentId)
    {
        $contentInfo = $this->contentHandler->loadContentInfo($contentId);

        return $this->mapContent(
            $this->contentHandler->load($contentId, $contentInfo->currentVersionNo)
        );
    }
785563
protected function getOriginalName($contentDisposition)
    {
        $originalName = (string) $this->request->get('name');
        if (empty($originalName) === true) {
            list($originalName) = sscanf(
                $contentDisposition,
                'attachment; filename=%s'
            );
        }

        return preg_replace('/[\'"]/', '', $originalName);
    }
556418
protected function findLocationsByContentIds(array $contentIds)
    {
        $locations = [];

        foreach ($contentIds as $contentId) {
            $content = $this->repository->getContentService()->loadContent($contentId);
            foreach($this->repository->getLocationService()->loadLocations($content->contentInfo) as $location) {
                $locations[$location->id] = $location;
            }
        }

        return $locations;
    }
47331
public function loadLocationsByContent($contentId, $rootLocationId = null)
    {
        $rows = $this->locationGateway->loadLocationDataByContent($contentId, $rootLocationId);

        return $this->locationMapper->createLocationsFromRows($rows);
    }
1327412
protected function getParents($contentId, $blockTypeId)
    {
        $content = $this->content->findOrFail($contentId);
        $blockType = $this->blockTypes->findOrFail($blockTypeId);

        return compact('content', 'blockType');
    }
917506
public function countLocationsByContentId($contentId)
    {
        try {
            return $this->innerGateway->countLocationsByContentId($contentId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
1151905
public function contentType($contentType = null) {
			if ($contentType != null) {
				$this->_contentType = $contentType;
				return true;
			}
			else {
				return $this->_contentType;
			}
		}
114339
public function getServerName(string $serverId)
    {
        if (!$this->hasServerConfiguration($serverId)) {
            return null;
        }

        return $this->configuration['connections'][$serverId]['name'];
    }
58862
private function getMainNodeId($contentId)
    {
        $query = $this->handler->createSelectQuery();
        $query
            ->select('node_id')
            ->from($this->handler->quoteTable('ezcontentobject_tree'))
            ->where(
                $query->expr->lAnd(
                    $query->expr->eq(
                        $this->handler->quoteColumn('contentobject_id'),
                        $query->bindValue($contentId, null, \PDO::PARAM_INT)
                    ),
                    $query->expr->eq(
                        $this->handler->quoteColumn('node_id'),
                        $this->handler->quoteColumn('main_node_id')
                    )
                )
            );
        $statement = $query->prepare();
        $statement->execute();

        $result = $statement->fetchAll(\PDO::FETCH_ASSOC);
        if (count($result) === 1) {
            return (int)$result[0]['node_id'];
        } else {
            return false;
        }
    }
70150
public function getContentKey($contentKey)
    {
        $contentKeyId = Utilities::getEntityId(
            $contentKey,
            'WindowsAzure\MediaServices\Models\ContentKey'
        );

        return ContentKey::createFromOptions(
            $this->_getEntity("ContentKeys('{$contentKeyId}')")
        );
    }
975080
public function exportAllAction($contentId)
    {
        $content = $this->contentService->loadContent($contentId);

        $exportCriteria = new ExportCriteria(
            [
                'content' => $content,
            ]
        );

        $export = $this->exporter->exportAll($exportCriteria);

        $writer = Writer::createFromFileObject(new SplTempFileObject());
        $writer->setDelimiter(",");
        $writer->setNewline("\r\n"); //use windows line endings for compatibility with some csv libraries
        $writer->setOutputBOM(Writer::BOM_UTF8); //adding the BOM sequence on output
        $writer->insertOne($export->header);
        $writer->insertAll($export->contents);

        $writer->output('export.csv');
        return new Response('');

    }
1264541
public function getProductName($productId): ?string
    {
        $product = $this->productRepository->find($productId);
        if (!$product instanceof ProductInterface) {
            return null;
        }

        return $product->getName();
    }
551384
public function getContentTypeName($contentType)
    {
        if (!$contentType instanceof ContentType) {
            try {
                $contentType = $this->contentTypeService->loadContentType($contentType);
            } catch (NotFoundException $e) {
                return '';
            }
        }

        return $contentType->getName();
    }
41314
public function syncFiles($contentId)
    {
        $content = $this->repository->getById($contentId);
        if (empty($content)) {
            return $this->respondNotFound();
        }
        $this->authorize('update', $content);
        $input   = $this->validator->validate('syncFiles');
        $content = $this->fileRepository->syncWith($content, $this->buildSyncData($input));
        return $this->respondWithSuccess($content);
    }
24237
public function countLocationsByContentId($contentId)
    {
        $q = $this->handler->createSelectQuery();
        $q
            ->select(
                $q->alias($q->expr->count('*'), 'count')
            )
            ->from($this->handler->quoteTable('ezcontentobject_tree'))
            ->where(
                $q->expr->eq(
                    $this->handler->quoteColumn('contentobject_id'),
                    $q->bindValue($contentId, null, \PDO::PARAM_INT)
                )
            );
        $stmt = $q->prepare();
        $stmt->execute();
        $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);

        return (int)$res[0]['count'];
    }
659814
protected function getUriForContent( $contentId, $absolute = false )
    {
        /* @var $model \Grid\Core\Model\Uri\Model */
        $service    = $this->getServiceLocator();
        $model      = $service->get( 'Grid\Core\Model\Uri\Model' );
        $subdomain  = $this->getSiteInfo()->getSubdomainId();
        $uri        = $model->findDefaultByContentLocale(
            $contentId,
            $this->locale,
            $subdomain
        );

        if ( empty( $uri ) )
        {
            return $this->getFallbackUri( $contentId, $absolute );
        }

        $result = '/' . $uri->safeUri;

        if ( $absolute || $subdomain != $uri->subdomainId )
        {
            $result = $this->getSiteInfo()
                           ->getSubdomainUrl(
                               $this->getSubdomain( $uri->subdomainId ),
                               $result
                           );
        }

        return $result;
    }