| | |
| | | |
| | | protected function initSchema():void |
| | | { |
| | | if (!array_key_exists('type', $this->config['schema'])){ |
| | | if (!array_key_exists('type', $this->config['schema'])) { |
| | | $registrar = Registrar::getInstance($this->slug); |
| | | if ($registrar) { |
| | | switch ($registrar->getType()) { |
| | | case 'term': |
| | | $this->config['schema']['type'] = 'JVBase\inc\managers\SEO\render\Thing\CreativeWork\WebPage\CollectionPage\CollectionPage'; |
| | | break; |
| | | case 'post': |
| | | $this->config['schema']['type'] = 'JVBase\managers\SEO\render\Thing\CreativeWork\CreativeWork'; |
| | | break; |
| | | case 'user': |
| | | $this->config['schema']['type'] = 'JVBase\managers\SEO\render\Thing\CreativeWork\WebPage\ProfilePage'; |
| | | break; |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (!array_key_exists('type', $this->config['schema'])) { |
| | | error_log('Missing schema type'); |
| | | return; |
| | | } |