Skip to content

Commit

Permalink
EWPP-1822: Rename method and fix comment in code.
Browse files Browse the repository at this point in the history
  • Loading branch information
sergepavle committed Jan 21, 2022
1 parent ebcda85 commit e55a7c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class InfoDisclosureExtraFieldBase extends DateAwareExtraFieldBase {
protected $dateFormatter;

/**
* LivestreamExtraField constructor.
* InfoDisclosureExtraFieldBase constructor.
*
* @param array $configuration
* A configuration array containing information about the plugin instance.
Expand Down Expand Up @@ -83,7 +83,7 @@ protected function isCurrentDay(int $timestamp): bool {
* @param int $timestamp
* The timestamp of start date.
*/
protected function addLivestreamDisclosure(array &$build, int $timestamp): void {
protected function attachLivestreamDisclosure(array &$build, int $timestamp): void {
$build['#attached'] = [
'library' => 'oe_theme_content_event/livestream_link_disclosure',
'drupalSettings' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function viewElements(ContentEntityInterface $entity) {
if ($this->isCurrentDay($event->getOnlineStartDate()->getTimestamp())) {
$build += $link;
$build['#hide_link'] = TRUE;
$this->addLivestreamDisclosure($build, $event->getOnlineStartDate()->getTimestamp());
$this->attachLivestreamDisclosure($build, $event->getOnlineStartDate()->getTimestamp());
}
}
$build['#date'] = $this->t('Starts on @date', [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function viewElements(ContentEntityInterface $entity) {
// But anyway keep information hidden from users till the time
// of online streaming has started.
$build['#hidden'] = TRUE;
$this->addLivestreamDisclosure($build, $event->getOnlineStartDate()->getTimestamp());
$this->attachLivestreamDisclosure($build, $event->getOnlineStartDate()->getTimestamp());
}

if ($event->isOnlinePeriodActive($this->requestDateTime)) {
Expand Down

0 comments on commit e55a7c1

Please sign in to comment.