Publication state.

@return string
1313
public function published()
    {
        $class = $this->entity->published ? 'fa fa-check-circle-o' : 'fa fa-circle-o';
        $state = $this->entity->published ? 'Published' : 'Unpublished';

        return html()->tag('i', '', ["class" => $class, "data-toggle" => "tooltip", "data-title" => $state]);
    }
1370614
protected function getState()
    {
        $data = [];
        foreach ($this->serialisedProperties as $property) {
            $data[$property] = $this->$property;
        }
        return $data;
    }
606123
public function getContent()
    {
        $content = null;
        if (0 < $this->revisions->count()) {
            $content = $this->revisions->get(0)->getContent();
        }

        return $content;
    }
787494
public function getStatusText()
    {
        $statusCode = $this->getStatusCode();

        if (!isset($this->defaultStatusTextList[$statusCode])) {
            return '';
        }

        return $this->defaultStatusTextList[$statusCode];
    }
1238914
public function getUserReadStatusAttribute()
    {
        if (!$this->old && auth()->check()) {
            if (is_null($this->reader)) {
                return self::STATUS_UNREAD;
            }

            return ($this->updatedSince($this->reader)) ? self::STATUS_UPDATED : false;
        }

        return false;
    }
995695
protected function plaintextState() {
		$this->emitRawTextRange( true, $this->pos, $this->length - $this->pos );
		return self::STATE_EOF;
	}
291605
public function getPublishedLabel()
    {
        $dateObj = $this->obj('PublishDate');
        if (!$dateObj) {
            return null;
        }

        $publisher = $this->getPublisherName();

        // Use "today"
        if ($dateObj->IsToday()) {
            if ($publisher) {
                return _t(
                    __CLASS__ . '.PUBLISHED_TODAY_BY',
                    'Today {time} by {name}',
                    [
                        'time' => $dateObj->Time12(),
                        'name' => $publisher,
                    ]
                );
            }
            // Today, no publisher
            return _t(
                __CLASS__ . '.PUBLISHED_TODAY',
                'Today {time}',
                ['time' => $dateObj->Time12()]
            );
        }

        // Use date
        if ($publisher) {
            return _t(
                __CLASS__ . '.PUBLISHED_DATE_BY',
                '{date} by {name}',
                [
                    'date' => $dateObj->FormatFromSettings(),
                    'name' => $publisher,
                ]
            );
        }

        // Date, no publisher
        return $dateObj->FormatFromSettings();
    }
819563
public function getStatus()
    {
        $status = null;

        if($entity = $this->getIterator()->current()) {
            $status = $entity->getStatus();
        }

        return $status;
    }
72480
public function getTitle() {
		if ($this->pageState->hasCurrent()) {
			return $this->pageState->getCurrentLeaf()->getTitle();
		}
		
		return $this->view->lookup(GeneralConfig::class)->getPageName();
	}
399209
protected function getState()
    {
        $state = null;
        if ($this->responseMode === 'query' && isset($_GET['state'])) {
            $state = $_GET['state'];
        } else if ($this->responseMode === 'form_post' && isset($_POST['state'])) {
            $state = $_POST['state'];
        }

        return $state;
    }
752575
public function isPublished()
    {
        return ($this->status >= Node::PUBLISHED)
        || ($this->status >= Node::PENDING && $this->published_at <= Carbon::now());
    }
275208
public function andIsVisible()
    {
        return $this->andWhere($this->getAlias().'._state = '.$this->expr()->literal(Page::STATE_ONLINE))
                        ->andWhere($this->getAlias().'._publishing IS NULL OR '.$this->getAlias().'._publishing <= '.$this->expr()->literal(date(self::$config['dateSchemeForPublishing'], time())))
                        ->andWhere($this->getAlias().'._archiving IS NULL OR '.$this->getAlias().'._archiving > '.$this->expr()->literal(date(self::$config['dateSchemeForPublishing'], time())));
    }
912692
public function isPublished() {

		$user = Yii::$app->core->getUser();

		if( isset( $user ) ) {

			// Always published for owner
			if( $this->createdBy == $user->id ) {

				return true;
			}

			// TODO: Add code for secured visibility with password match

			// Visible to logged in users in strictly protected mode
			if( $this->isPublic() && $this->isVisibilityProtected() ) {

				return true;
			}
		}

		// Status(Active or Frozen) with public visibility
		return $this->isPublic() && $this->isVisibilityPublic( false );
	}
1271536
public function getIsPublishScheduled()
    {
        if (!$this->owner->PublishOnDate) {
            return false;
        }
        $now = DBDatetime::now()->getTimestamp();
        $publish = $this->owner->dbObject('PublishOnDate')->getTimestamp();

        return $now < $publish;
    }
239849
public function publishSingle()
    {
        $owner = $this->owner;
        // get the last published version
        $original = null;
        if ($this->isPublished()) {
            $original = self::get_by_stage($owner->baseClass(), self::LIVE)
                ->byID($owner->ID);
        }

        // Publish it
        $owner->invokeWithExtensions('onBeforePublish', $original);
        $owner->writeToStage(static::LIVE);
        $owner->invokeWithExtensions('onAfterPublish', $original);
        return true;
    }
1112841
public function isPublishedNice()
    {
        $field = DBBoolean::create('isPublished');
        $field->setValue($this->isPublished());

        return $field->Nice();
    }
982453
public function changeState()
    {
        $this->getStates();

        $actualState = $this->getState();
        $newState = self::$statesHandler[$actualState]['state'];
        $action = self::$statesHandler[$actualState]['action'];

        $this->setState($newState);
        $this->doAction($action);

        return $newState;
    }