19 declare(strict_types=1);
31 public function __construct(
int $a_context = self::CONTEXT_REPOSITORY)
42 public function init(): void
44 $this->static_link_enabled =
true;
45 $this->delete_enabled =
true;
46 $this->cut_enabled =
true;
47 $this->copy_enabled =
true;
48 $this->subscribe_enabled =
true;
49 $this->link_enabled =
true;
50 $this->info_screen_enabled =
true;
51 $this->type = self::OBJ_TYPE;
52 $this->gui_class_name =
'ilObjContentPageGUI';
56 $this->
lng->loadLanguageModule(
'copa');
76 $maySee = $this->rbacsystem->checkAccess(
'visible', $this->ref_id);
77 $mayRead = $this->rbacsystem->checkAccess(
'read', $this->ref_id);
79 if (!$maySee && !$mayRead) {
83 $properties = parent::getProperties();
90 if (!$settingsStorage->getSettings()->isReadingTimeEnabled()) {
96 $language = $ot->getEffectiveContentLang($this->
user->getCurrentLanguage(),
$this->type);
98 $pageMetrics = $this->pageMetricsService->get(
102 $readingTimePropertyValue = sprintf(
103 $this->
lng->txt(
'copa_value_reading_time_f_p'),
104 (string) $pageMetrics->readingTime()->minutes()
106 if (1 === $pageMetrics->readingTime()->minutes()) {
107 $readingTimePropertyValue = sprintf(
108 $this->
lng->txt(
'copa_value_reading_time_f_s'),
109 (string) $pageMetrics->readingTime()->minutes()
115 'property' => $this->
lng->txt(
'copa_prop_reading_time'),
116 'value' => $readingTimePropertyValue,
__construct(int $a_context=self::CONTEXT_REPOSITORY)
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
static lookupOfflineStatus(int $obj_id)
Lookup offline status using objectDataCache.
checkInfoPageOnAsynchronousRendering()
static getInstance(int $obj_id)
__construct(Container $dic, ilPlugin $plugin)
bool $info_screen_enabled
const INFO_TAB_VISIBILITY
PageMetricsService $pageMetricsService