123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <?php
- namespace Drupal\heartbeat8\Entity;
- use Drupal\Core\Config\Entity\ConfigEntityBase;
- /**
- * Defines the Heartbeat stream entity.
- *
- * @ConfigEntityType(
- * id = "heartbeat_stream",
- * label = @Translation("Heartbeat stream"),
- * handlers = {
- * "list_builder" = "Drupal\heartbeat8\HeartbeatStreamListBuilder",
- * "form" = {
- * "add" = "Drupal\heartbeat8\Form\HeartbeatStreamForm",
- * "edit" = "Drupal\heartbeat8\Form\HeartbeatStreamForm",
- * "delete" = "Drupal\heartbeat8\Form\HeartbeatStreamDeleteForm"
- * },
- * "route_provider" = {
- * "html" = "Drupal\heartbeat8\HeartbeatStreamHtmlRouteProvider",
- * },
- * },
- * config_prefix = "heartbeat_stream",
- * admin_permission = "administer site configuration",
- * entity_keys = {
- * "id" = "id",
- * "label" = "label",
- * "uuid" = "uuid"
- * },
- * links = {
- * "canonical" = "/admin/structure/heartbeat_stream/{heartbeat_stream}",
- * "add-form" = "/admin/structure/heartbeat_stream/add",
- * "edit-form" = "/admin/structure/heartbeat_stream/{heartbeat_stream}/edit",
- * "delete-form" = "/admin/structure/heartbeat_stream/{heartbeat_stream}/delete",
- * "collection" = "/admin/structure/heartbeat_stream"
- * }
- * )
- */
- class HeartbeatStream extends ConfigEntityBase implements HeartbeatStreamInterface {
- /**
- * The Heartbeat stream ID.
- *
- * @var string
- */
- protected $id;
- /**
- * The Heartbeat stream label.
- *
- * @var string
- */
- protected $label;
- // Class name used.
- protected $name;
- // Class to variable for ease of read/write.
- protected $class;
- // Real class to load for cloned streams.
- protected $real_class;
- // The path to the class.
- protected $path;
- // Human readable name.
- protected $title;
- // Module where query builder is located.
- protected $module;
- // Extra variables.
- //TODO variables might be put into config api
- protected $variables;
- // Indicates whether this stream has a block display or not.
- protected $has_block = TRUE;
- // Max number of items in block display.
- protected $block_items_max = 25;
- // Number to indicate how a block-pager should be shown.
- protected $block_show_pager = 0;
- // View mode for the block.
- protected $block_view_mode = 'default';
- // Maximum number of items in the page display.
- protected $page_items_max = 50;
- // Boolean to indicate of a page-pager should be shown.
- protected $page_show_pager = 0;
- // Boolean to indicate if the pager is ajax-driven.
- protected $page_pager_ajax = 0;
- // View mode for the page.
- protected $page_view_mode = 'default';
- // Setting for the number of grouped items maximum.
- protected $show_message_times = 1;
- // Setting for the number of grouped items maximum in a grouped message.
- protected $show_message_times_grouped = 0;
- // Denied message templates.
- protected $messages_denied = array();
- // Limit the number of messages by maximum messages to load.
- protected $num_load_max = 100;
- // Limit the timespan to group messages.
- protected $grouping_seconds = 7200;
- // Boolean for to skip the viewing user, defaults to false.
- protected $skip_active_user = FALSE;
- // Timestamp used to poll for newer messages.
- protected $poll_messages = 0;
- // How to notify there are newer messages.
- protected $poll_messages_type = 0;
- // Stream path is the path to the stream page (optional).
- protected $stream_path;
- // Stream user path is the path to a stream on the profile page (optional).
- protected $stream_profile_path;
- // Settings variable
- protected $settings;
- /**
- * @return mixed
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * @param mixed $name
- */
- public function setName($name)
- {
- $this->name = $name;
- }
- /**
- * @return mixed
- */
- public function getClass()
- {
- return $this->class;
- }
- /**
- * @param mixed $class
- */
- public function setClass($class)
- {
- $this->class = $class;
- }
- /**
- * @return mixed
- */
- public function getRealClass()
- {
- return $this->real_class;
- }
- /**
- * @param mixed $real_class
- */
- public function setRealClass($real_class)
- {
- $this->real_class = $real_class;
- }
- /**
- * @return mixed
- */
- public function getPath()
- {
- return $this->path;
- }
- /**
- * @param mixed $path
- */
- public function setPath($path)
- {
- $this->path = $path;
- }
- /**
- * @return mixed
- */
- public function getTitle()
- {
- return $this->title;
- }
- /**
- * @param mixed $title
- */
- public function setTitle($title)
- {
- $this->title = $title;
- }
- /**
- * @return mixed
- */
- public function getModule()
- {
- return $this->module;
- }
- /**
- * @param mixed $module
- */
- public function setModule($module)
- {
- $this->module = $module;
- }
- /**
- * @return mixed
- */
- public function getVariables()
- {
- return $this->variables;
- }
- /**
- * @param mixed $variables
- */
- public function setVariables($variables)
- {
- $this->variables = $variables;
- }
- /**
- * @return mixed
- */
- public function getSettings()
- {
- return $this->settings;
- }
- /**
- * @param mixed $settings
- */
- public function setSettings($settings)
- {
- $this->settings = $settings;
- }
- }
|