1<?php 2 3 4namespace ComboStrap; 5 6use action_plugin_combo_metaprocessing; 7use ComboStrap\Meta\Api\MetadataText; 8use ComboStrap\Meta\Store\MetadataDokuWikiStore; 9 10/** 11 * Class DisqusIdentifier 12 * @package ComboStrap 13 * @deprecated for the page id 14 */ 15class DisqusIdentifier extends MetadataText 16{ 17 18 19 public const PROPERTY_NAME = "disqus_identifier"; 20 21 public static function createForResource($page): DisqusIdentifier 22 { 23 return (new DisqusIdentifier()) 24 ->setResource($page); 25 } 26 27 static public function getTab(): ?string 28 { 29 // Page id should be taken 30 return null; 31 } 32 33 static public function getDescription(): string 34 { 35 return "The identifier of the disqus forum"; 36 } 37 38 static public function getLabel(): string 39 { 40 return "Disqus Identifier"; 41 } 42 43 public static function getName(): string 44 { 45 return self::PROPERTY_NAME; 46 } 47 48 static public function getPersistenceType(): string 49 { 50 return MetadataDokuWikiStore::PERSISTENT_DOKUWIKI_KEY; 51 } 52 53 static public function isMutable(): bool 54 { 55 return true; 56 } 57 58 public function getDefaultValue(): ?string 59 { 60 61 return $this->getResource()->getUid()->getValueOrDefault(); 62 63 } 64 65 static public function getCanonical(): string 66 { 67 return "disqus"; 68 } 69 70 71} 72