Set CSS classes for templates
@param string $class CSS classes.
@return DataObject Owner
421838
public function setEmbedClass($class)
    {
        $classes = ($class) ? explode(' ', $class) : [];
        foreach ($classes as $key => $value) {
            $this->classes[$value] = $value;
        }
        return $this->owner;
    }
163799
final public function set($id, $class = null)
    {
        $defaults = $this->defaults;
        $allowParent = !$defaults->getChanges() && empty($this->instanceof);

        $definition = new Definition();
        $definition->setPublic($defaults->isPublic());
        $definition->setAutowired($defaults->isAutowired());
        $definition->setAutoconfigured($defaults->isAutoconfigured());
        $definition->setBindings($defaults->getBindings());
        $definition->setChanges(array());

        $configurator = new ServiceConfigurator($this->container, $this->instanceof, $allowParent, $this, $definition, $id, $defaults->getTags());

        return null !== $class ? $configurator->class($class) : $configurator;
    }
317887
function bindTo($class)
    {
        if (!is_object($class))
            throw new \Exception(sprintf(
                'Given class must be an object (%s) given.'
                , \Poirot\Std\flatten($class)
            ));

        $this->_t__bindTo = $class;

        return $this;
    }
109546
public function setClass($iconClass)
    {
        $this->attributes->removeAttributeClass(['fa', 'fa-*']);
        $this->attributes->addAttributeClass($iconClass);

        return $this;
    }
1233042
public function Highlight($class = 'highlight')
    {
        $owner = $this->owner;
        $new = DBHTMLText::create();
        $new->name = $owner->name;
        $owner->value = $owner->forTemplate();
        $new->value = preg_replace('/\[([^\]]*)\]/', '<span class="' . $class . '">$1</span>', $owner->value);
        return $new;
    }
146641
public function setClassAttr($classes)
    {
        if (is_array($classes)) {
            $classes = implode(' ', $classes);
        }

        $this->classAttr = $classes;

        return $this;
    }
761272
public function addClass($class)
    {
        if (is_array($class)) {
            foreach ($class as $c) {
                $this->addClass($class);
            }

            return $this;
        }
        $this->template->append('class', ' '.$class);

        return $this;
    }
226679
public function addClass( string $class ): Tag
    {

        if ( ! isset( $this->attributes['class'] ) ) {
            $this->attributes['class'] = $class;
        } else {
            $this->attributes['class'] .= " $class";
        }

        return $this;
    }
18708
public function setFormGroupCssClass($cssClass)
    {
        $cssClass = array_merge($this->defaultFormGroupCssClasses(), $this->parseCssClasses($cssClass));
        $this->formGroupCssClass = array_unique($cssClass);
        return $this;
    }
963752
public function addTableClass($class)
    {
        $class = is_array($class) ? implode(' ', $class) : $class;
        $currentClass = Arr::get(array_change_key_case($this->tableAttributes), 'class');

        $classes = preg_split('#\s+#', $currentClass . ' ' . $class, null, PREG_SPLIT_NO_EMPTY);
        $class = implode(' ', array_unique($classes));

        return $this->setTableAttribute('class', $class);
    }
1087886
public static function registerThemeClass(string $class): bool
    {
        if (class_exists($class) === false) {
            return false;
        }
        $check = new ReflectionClass($class);
        if ($check->implementsInterface("TheCMSThread\\Classes\\Theme") === true) {
            self::$theme_class = $class;
            return true;
        } else {
            return false;
        }
    }
537112
public function baseDataClass($class)
    {
        $current = $class;
        while ($next = get_parent_class($current)) {
            if ($next === DataObject::class) {
                // Only use ClassInfo::class_name() to format the class if we've not used get_parent_class()
                return ($current === $class) ? ClassInfo::class_name($current) : $current;
            }
            $current = $next;
        }
        throw new InvalidArgumentException("$class is not a subclass of DataObject");
    }
1162203
public function addClass ($class)
    {
        $targetArray = &$this->customClasses;
        if (!is_array($class))
            $targetArray[] = $class;
        else
            $targetArray = array_merge($targetArray, $class);
        return $this;
    }
846294
public function removeClass($class)
    {
        if (!is_array($class)) {
            $class = preg_split('/\s+/', $class, null, PREG_SPLIT_NO_EMPTY);
        }
        $curClass = array_diff(
            preg_split('/\s+/', $this->getAttribute('class'),
                       null, PREG_SPLIT_NO_EMPTY),
            $class
        );
        if (0 == count($curClass)) {
            $this->removeAttribute('class');
        } else {
            $this->setAttribute('class', implode(' ', $curClass));
        }
        return $this;
    }
464107
public function addClass($class)
    {
        if (!is_array($class)) {
            $class = preg_split('/\s+/', $class, null, PREG_SPLIT_NO_EMPTY);
        }
        $curClass = preg_split('/\s+/', $this->getAttribute('class'),
                               null, PREG_SPLIT_NO_EMPTY);
        foreach ($class as $c) {
            if (!in_array($c, $curClass)) {
                $curClass[] = $c;
            }
        }
        $this->setAttribute('class', implode(' ', $curClass));

        return $this;
    }
114720
private function fromStdObject(\stdClass $data, $class)
    {
        $reflection   = $this->getReflection($class);
        $object       = $this->getClassInstance($data, $reflection);
        $map          = $this->getPropertyMap($class);
        $this->handleAssociations($data, $object, $reflection, $map['associations'], $map['meta']);
        $this->handleProperties($data, $object, $reflection, $map['fields']);

        return $object;
    }
502770
public function setClass($identifier, $class)
    {
        $class      = trim($class);
        $identifier = (string) $identifier;

        $this->_classes[$identifier] = $class;

        return $this;
    }