1<?php 2 3 4namespace ComboStrap; 5 6 7use action_plugin_combo_qualitymessage; 8 9class QualityDynamicMonitoringOverwrite extends MetadataBoolean 10{ 11 12 /** 13 * Key in the frontmatter that disable the message 14 */ 15 public const PROPERTY_NAME = "dynamic_quality_monitoring"; 16 public const EXECUTE_DYNAMIC_QUALITY_MONITORING_DEFAULT = true; 17 18 public static function createFromPage(Page $page) 19 { 20 return (new QualityDynamicMonitoringOverwrite()) 21 ->setResource($page); 22 } 23 24 public function getTab(): ?string 25 { 26 return MetaManagerForm::TAB_QUALITY_VALUE; 27 } 28 29 public function getDescription(): string 30 { 31 return "If checked, the quality message will not be shown for the page."; 32 } 33 34 public function getLabel(): string 35 { 36 return "Disable the quality control of this page"; 37 } 38 39 public function getCanonical(): string 40 { 41 return action_plugin_combo_qualitymessage::CANONICAL; 42 } 43 44 45 static public function getName(): string 46 { 47 return self::PROPERTY_NAME; 48 } 49 50 public function getPersistenceType(): string 51 { 52 return Metadata::PERSISTENT_METADATA; 53 } 54 55 public function getMutable(): bool 56 { 57 return true; 58 } 59 60 public function getDefaultValue(): bool 61 { 62 return self::EXECUTE_DYNAMIC_QUALITY_MONITORING_DEFAULT; 63 } 64} 65