Habari\Block::content_type PHP Метод

content_type() публичный Метод

Return the content types that this object represents
См. также: IsContent
public content_type ( ) : array
Результат array An array of strings representing the content type of this object
    public function content_type()
    {
        $types = array('block.' . $this->type, 'block');
        if (isset($this->title)) {
            array_unshift($types, 'block.' . $this->type . '.' . Utils::slugify($this->title));
        }
        if (isset($this->_area)) {
            $areas = array();
            foreach ($types as $type) {
                $areas[] = $this->_area . '.' . $type;
            }
            $types = array_merge($areas, $types);
        }
        $types = Plugins::filter('block_content_type_' . $this->type, $types, $this);
        $types = Plugins::filter('block_content_type', $types, $this);
        return $types;
    }