| | |
| | | <?php |
| | | namespace JVBase\rest\routes; |
| | | |
| | | use JVBase\registrar\Registrar; |
| | | use JVBase\rest\Rest; |
| | | use JVBase\managers\Cache; |
| | | use JVBase\managers\SEO\ConfigManager; |
| | |
| | | */ |
| | | class SEORoutes extends Rest |
| | | { |
| | | protected SchemaBuilder $registry; |
| | | // protected SchemaBuilder $registry; |
| | | |
| | | public function __construct() |
| | | { |
| | | $this->cacheName = 'schema'; |
| | | parent::__construct(); |
| | | $this->registry = SchemaBuilder::getInstance(); |
| | | // $this->registry = SchemaBuilder::getInstance(); |
| | | } |
| | | |
| | | /** |
| | |
| | | 'action' => 'string|required|enum:save,reset,preview', |
| | | 'context'=> 'string|required' |
| | | ]) |
| | | ->rateLimit(30); |
| | | ->rateLimit(30) |
| | | ->register(); |
| | | |
| | | Route::for('seo/fields') |
| | | ->get([$this, 'getFields']) |
| | | ->auth('admin') |
| | | ->args([ |
| | | 'type'=>'string|required' |
| | | ]); |
| | | ]) |
| | | ->register(); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | // Check if it's a valid content/taxonomy/user type |
| | | return $this->checkContent($context, true); |
| | | return (bool)Registrar::getInstance($context); |
| | | } |
| | | } |