Build the string representing the single graph item

@param ClassMetadata $class
@return string
547161
public function getClassString(ClassMetadata $class)
    {
        $className = $class->getName();

        if (!isset($this->classStrings[$className])) {
            $this->associationLogger->visitAssociation($className);

            $parentFields = $this->getParentFields($class);
            $fields       = $this->getClassFields($class, $parentFields, $this->showFieldsDescription);


            $methods = $this->annotationParser->getClassMethodsAnnotations($className);

            $this->classStrings[$className] = $this->stringHelper->getClassText($className, $fields, $methods);
        }

        return $this->classStrings[$className];
    }
363289
private function buildAlias($class)
    {
        $parts     = explode('\\', $class);
        $shortName = end($parts);

        if (false === strpos($shortName, 'Validator')) {
            return Inflector::tableize($shortName);
        }

        if ('Validator' !== substr($shortName, -9)) {
            return Inflector::tableize($shortName);
        }

        return Inflector::tableize(substr($shortName, 0, -9));
    }
195227
public static function toMethod($class, $asArray = false)
    {
        if (is_string($class)) {
            $class = self::split($class);
        }
        $method = array_pop($class);
        $classname = implode("\\", $class);
        return ($asArray) ? [$classname, $method] : "$classname::$method";
    }
351130
protected function getDocumentMetadata($documentClass)
    {
        $factory = new \Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory();
        $factory->setDocumentManager($this->getDocumentManager());
        $factory->setConfiguration($this->getDocumentManager()->getConfiguration());

        $metadata = $factory->getMetadataFor($documentClass);

        return $metadata;
    }
1231550
private function generateLazyPropertiesDefaults(ClassMetadata $class)
    {
        $lazyPublicProperties = $this->getLazyLoadedPublicProperties($class);
        $values               = [];

        foreach ($lazyPublicProperties as $key => $value) {
            $values[] = var_export($key, true) . ' => ' . var_export($value, true);
        }

        return implode(', ', $values);
    }
607356
public function links($class = null)
    {
        if (is_null($class)) {
            $class = '';
        }

        $dateArray = explode('-', $this->date);
        $previousMonth = Carbon::create($dateArray[0], $dateArray[1], $dateArray[2])->subMonth()->toDateString();
        $nextMonth = Carbon::create($dateArray[0], $dateArray[1], $dateArray[2])->addMonth()->toDateString();

        $links = '<div class="row calendar-links"><div class="col-12">';
        $links .= '<a class="previous '.$class.'" href="'.url('events/'.$previousMonth).'">Previous Month</a>';
        $links .= '<a class="next '.$class.'" href="'.url('events/'.$nextMonth).'">Next Month</a>';
        $links .= '</div></div>';

        return $links;
    }
579522
private function getFromCache(string $class): ?ClassMetadataInterface
    {
        if (null === $this->cache) {
            return null;
        }

        if ($this->cache instanceof Cache) {
            $cached = $this->cache->fetch($class) ?: null;
        } else {
            $class = preg_replace('#[\{\}\(\)/\\\\@:]#', '_', str_replace('_', '__', $class));
            $item = $this->cache->getItem($class);
            $cached = $item->isHit() ? $item->get() : null;
        }

        return $cached;
    }
1252238
protected function getValidAlgorithm($class)
    {
        $logging = \Plop\Plop::getInstance();;
        $w =    'abcdefghijklmnopqrstuvwxyz' .
                'ABCDEFGHIJKLMNOPQRSTUVWXYZ' .
                '1234567890-@.';
        $name = $class::getName();
        if (!is_string($name) || strspn($name, $w) !== strlen($name)) {
            $logging->debug(
                'Skipping algorithm "%(name)s" (invalid algorithm name)',
                array('name' => $name)
            );
            return null;
        }
        return $name;
    }
1180499
public function whenCreating($class)
    {
        if (!isset($this->args[$class])) {
            $this->args[$class] = new ClassMeta($class, $this);
        }

        return $this->args[$class];
    }
565864
private function buildClassNode(core_kernel_classes_Class $class, core_kernel_classes_Class $parent = null)
    {
    	$label = $class->getLabel();
        $label = empty($label) ? __('no label') : $label;

        return array(
            'data' 	=> _dh($label),
            'type'	=> 'class',
            'attributes' => array(
                'id' => tao_helpers_Uri::encode($class->getUri()),
                'class' => 'node-class',
                'data-uri' => $class->getUri(),
                'data-classUri' => is_null($parent) ? null : $parent->getUri(),
                'data-signature' => $this->getSignatureGenerator()->generate($class->getUri()),
            )
        );
    }
152344
public function getBtn($class)
    {
        $buttons = null;
        $xPath = new DOMXPath($this->getDomXml());
        $nodeList = $xPath->query("//TAB[@cl='$class']/../BTN");
        if ($nodeList->length) {
            $buttons = new stdClass();
            foreach ($nodeList as $node) {
                $btnId = $node->getAttribute('id');
                $buttons->$btnId = 1;
            }
        }

        return $buttons;
    }
959228
public static function getFolderForClass($class)
    {
        $folderName = 'Uploads';

        if (is_object($class)) {
            if (method_exists($class, 'hasMethod') && $class->hasMethod('BaseFolder')) {
                $folderName = $class->BaseFolder();
            }
            elseif ($class instanceof Page) {
                $folderName = get_class($class);
            }
            elseif ($class instanceof DataObject) {
                $folderName = $class->baseTable();
            }
            elseif ($class instanceof DataExtension) {
                $folderName = $class->getOwner()->baseTable();
            }
            else {
                $folderName = get_class($class);
            }
        }
        elseif (is_string($class)) {
            $folderName = $class;
        }

        if (class_exists('Subsite') && Config::inst()->get(
            __CLASS__,
            'use_subsite_integration'
        )) {
            $subsite = Subsite::currentSubsite();
            if ($subsite) {
                // Subsite extras integration$
                if ($subsite->hasField('BaseFolder')) {
                    $baseFolder = $subsite->BaseFolder;
                }
                else {
                    $filter = new URLSegmentFilter();
                    $baseFolder = $filter->filter($subsite->getTitle());
                    $baseFolder = str_replace(
                        ' ',
                        '',
                        ucwords(str_replace('-', ' ', $baseFolder))
                    );
                }
                if (!empty($baseFolder)) {
                    $folderName = $baseFolder . '/' . $folderName;
                }
            }
        }

        return $folderName;
    }
1296358
private function generateMagicIsset(ClassMetadata $class)
    {
        $lazyPublicProperties = array_keys($this->getLazyLoadedPublicProperties($class));
        $hasParentIsset       = $class->getReflectionClass()->hasMethod('__isset');

        if (empty($lazyPublicProperties) && ! $hasParentIsset) {
            return '';
        }

        $inheritDoc = $hasParentIsset ? '{@inheritDoc}' : '';
        $magicIsset = <<<EOT
    /**
     * $inheritDoc
     * @param  string \$name
     * @return boolean
     */
    public function __isset(\$name)
    {

EOT;

        if ( ! empty($lazyPublicProperties)) {
            $magicIsset .= <<<'EOT'
        if (array_key_exists($name, $this->__getLazyProperties())) {
            $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);

            return isset($this->$name);
        }


EOT;
        }

        if ($hasParentIsset) {
            $magicIsset .= <<<'EOT'
        $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);

        return parent::__isset($name);

EOT;
        } else {
            $magicIsset .= "        return false;";
        }

        return $magicIsset . "\n    }";
    }
232710
public function getApplicationIdByClass(string $class): string
    {
        foreach ($this->applications as $appId => $appConfig) {
            if ($appConfig['class'] === $class) {
                return $appId;
            }
        }
        throw new \RuntimeException('Application id not found.', Saw::ERROR_APPLICATION_CLASS_NOT_EXISTS);
    }
1202028
public function getClassMetadata($class)
    {
        $class = ltrim($class, '\\');
        $metadataIndex = $this->getCacheId($class);

        if (isset($this->loadedMetadata[$metadataIndex])) {
            return $this->loadedMetadata[$metadataIndex];
        }

        if (isset($this->cache)) {
            if (false !== ($metadata = $this->cache->fetch($metadataIndex))) {
                return $metadata;
            }
        }

        $metadata = new $this->metadataClassName($class);

        $parentClasses = array_reverse(class_parents($class));
        foreach ($parentClasses as $parentClass) {
            $metadata->setClassName($parentClass);
            $this->driver->loadClassMetadata($metadata);
        }

        $metadata->setClassName($class);
        $this->driver->loadClassMetadata($metadata);

        if (isset($this->cache)) {
            $this->cache->save($metadataIndex, $metadata);
        }
        $this->loadedMetadata[$metadataIndex] = $metadata;

        return $metadata;
    }
229904
public static function tableize($class)
    {
        $underscored = Strings::camelCaseToUnderscore($class);
        $parts = explode('_', $underscored);
        $suffix = Inflector::pluralize(array_pop($parts));
        $parts[] = $suffix;
        return implode('_', $parts);
    }
614734
private function getMetadata($class)
    {
        $class = ClassUtils::getRealClass(ltrim($class, '\\'));

        if (!array_key_exists($class, $this->metadataCache)) {
            $this->metadataCache[$class] = null;

            if (null !== $manager = $this->registry->getManagerForClass($class)) {
                $this->metadataCache[$class] = $manager->getClassMetadata($class);
            }
        }

        return $this->metadataCache[$class];
    }