|
@@ -2,8 +2,8 @@
|
|
|
|
|
|
namespace Drupal\dr8_zth\Entity;
|
|
namespace Drupal\dr8_zth\Entity;
|
|
|
|
|
|
-
|
|
|
|
-use Drupal\Core\Config\Entity\ConfigEntityBase;
|
|
|
|
|
|
+use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
|
|
|
|
+use Drupal\dr8_zth\BlogTypeInterface;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Defines the taxonomy vocabulary entity.
|
|
* Defines the taxonomy vocabulary entity.
|
|
@@ -12,6 +12,10 @@ use Drupal\Core\Config\Entity\ConfigEntityBase;
|
|
* id = "blog_type",
|
|
* id = "blog_type",
|
|
* label = @Translation("Blog type"),
|
|
* label = @Translation("Blog type"),
|
|
* handlers = {
|
|
* handlers = {
|
|
|
|
+ * "form" = {
|
|
|
|
+ * "default" = "Drupal\dr8_zth\Form\BlogTypeForm",
|
|
|
|
+ * "delete" = "Drupal\dr8_zth\Form\BlogTypeDeleteForm"
|
|
|
|
+ * },
|
|
* "list_builder" = "Drupal\Core\Config\Entity\ConfigEntityListBuilder",
|
|
* "list_builder" = "Drupal\Core\Config\Entity\ConfigEntityListBuilder",
|
|
* },
|
|
* },
|
|
* admin_permission = "administer blog",
|
|
* admin_permission = "administer blog",
|
|
@@ -34,6 +38,49 @@ use Drupal\Core\Config\Entity\ConfigEntityBase;
|
|
* }
|
|
* }
|
|
* )
|
|
* )
|
|
*/
|
|
*/
|
|
-class BlogType extends ConfigEntityBase {
|
|
|
|
|
|
+class BlogType extends ConfigEntityBundleBase implements BlogTypeInterface {
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * The blog type description.
|
|
|
|
+ *
|
|
|
|
+ * @var string
|
|
|
|
+ */
|
|
|
|
+ protected $description;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * The label entity_key.
|
|
|
|
+ *
|
|
|
|
+ * @var string
|
|
|
|
+ */
|
|
|
|
+ protected $name;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * The id entity_key.
|
|
|
|
+ *
|
|
|
|
+ * @var string
|
|
|
|
+ */
|
|
|
|
+ protected $type;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * {@inheritdoc}
|
|
|
|
+ */
|
|
|
|
+ public function id() {
|
|
|
|
+ return $this->type;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * {@inheritdoc}
|
|
|
|
+ */
|
|
|
|
+ public function getDescription() {
|
|
|
|
+ return $this->description;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * {@inheritdoc}
|
|
|
|
+ */
|
|
|
|
+ public function setDescription($description) {
|
|
|
|
+ $this->description = $description;
|
|
|
|
+ return $this;
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|