Checks if a record is published in a public feed.

@param int $sbas_id
@param int $record_id

@return bool
199278
public function isRecordInPublicFeed($sbas_id, $record_id)
    {
        $dql = 'SELECT COUNT(i)
            FROM Phraseanet:FeedItem i
            JOIN i.entry e
            JOIN e.feed f
            WHERE i.sbasId = :sbas_id
                AND i.recordId = :record_id
                AND f.public = true';

        $query = $this->_em->createQuery($dql);
        $query->setParameters(['sbas_id' => $sbas_id, 'record_id' => $record_id]);

        return $query->getSingleScalarResult() > 0;
    }
1076030
public function deleteRecord(int $recordID) {
        foreach ($this->getRecords() as $key => $record) {
            if ($record['id'] == $recordID) {
                $this->database->getReference()
                    ->getChild($this->table)
                    ->getChild($key)
                    ->set(null);

                return true;
            }
        }

        return false;
    }
1135407
public function isUnpublished()
	{
		if (!array_key_exists('state', $this->_tbl->getFields()))
		{
			return false;
		}
		if ($this->get('state') == self::APP_STATE_UNPUBLISHED)
		{
			return true;
		}
		return false;
	}
491248
public function anythingButRecord()
    {
        foreach (array_keys($this->getDataPlaceHolder()) as $key) {
            $v = $this[$key];
            if ($v instanceof RecordContainer) {
                return false;
            }
        }

        return true;
    }
268628
public function isPublished()
    {
        if (
            $this->getStatus() === PageStatus::PUBLISHED ||
            ($this->getStatus() === PageStatus::SCHEDULED &&
            $this->getPublishedAt() < new \DateTime())
            ) {
            return true;
        } else {
            return false;
        }
    }
1029787
@Override
  public final void publish(LogRecord record)
  {
    if (! isLoggable(record)) {
      return;
    }

    Filter filter = getFilter();

    if (filter != null && ! filter.isLoggable(record))
      return;

    if (record == null) {
      System.out.println(this + ": no record");
      return;
    }

    //synchronized (this) {
      processPublish(record);
      //processFlush();
    //}

    /*
    _logQueue.offer(record);

    if (CurrentTime.isTest()) {
      waitForEmpty();
    }
    */
  }
749526
public function hasSessionData($session_id = '')
    {
        if (isset($this->objectSession) && $this->objectSession != NULL && is_object($this->objectSession)) {
            $this->logger->info(__FUNCTION__, 'Session with CI Session Class');
            if ($this->objectSession->has_userdata($session_id)) {
                return TRUE;
            }
        } else {
            $this->logger->info(__FUNCTION__, 'Session with The Http Foundation Component');
            if ($this->session->has($session_id)) {
                return TRUE;
            }
        }

        return FALSE;
    }
95223
private function processEventNotificationLogRecord(array $records, $currentRecordIndex)
    {
        $record = $records[$currentRecordIndex];

        $record['message'] = null;
        $record['channel'] = '_event_notify';
        $record['context'] = array($record['context']['event'] => $record['context']['listener']);

        // if the previous record is also an event notification, combine them
        if (isset($records[$currentRecordIndex - 1]) && $this->isEventNotificationLog($records[$currentRecordIndex - 1])) {
            $record['_properties']['display_log_info'] = false;
        }

        return $record;
    }
1338205
public function on_sbas_ids(Array $sbas_ids = null)
    {
        if (! $sbas_ids) {
            return $this;
        }

        $this->sbas_restrictions = true;

        $this->include_phantoms(false);

        if (count($this->sbas_ids) > 0) {
            $this->sbas_ids = array_intersect($this->sbas_ids, $sbas_ids);
        } else {
            $this->sbas_ids = $sbas_ids;
        }

        $this->total = $this->page = $this->total_page = null;

        return $this;
    }
304768
protected function getPublishAction($record)
    {
        if (!$record || !$record->canPublish()) {
            return null;
        }

        // Build action
        $publishText = _t('SilverStripe\\AssetAdmin\\Controller\\AssetAdmin.PUBLISH_BUTTON', 'Publish');
        /** @var FormAction $action */
        $action = FormAction::create('publish', $publishText)
            ->setIcon('rocket')
            ->setSchemaState([
                'data' => [
                    'isPublished' => $record->isPublished(),
                    'isModified' => $record->isModifiedOnDraft(),
                    'pristineTitle' => _t(__CLASS__ . 'PUBLISHED', 'Published'),
                    'pristineIcon' => 'tick',
                    'dirtyTitle' => _t(__CLASS__ . 'PUBLISH', 'Publish'),
                    'dirtyIcon' => 'rocket',
                    'pristineClass' => 'btn-outline-primary',
                    'dirtyClass' => '',
                ],
            ])
            ->setSchemaData(['data' => ['buttonStyle' => 'primary']]);

        return $action;
    }
1367876
public boolean hasNext() throws DBException
    {
        if (m_iCurrentRecord >= m_iRecordsAccessed)
            return true;
        Object record = this.next();
        if (record == null)
            return false;
        else
        {
            m_iRecordsAccessed--;   // Offically this record has not been accessed
            return true;
        }
    }
1048935
def is_published(self):
        """"""
        return self.status == Status.published and self.timestamp <= arrow.now()
1271536
public function getIsPublishScheduled()
    {
        if (!$this->owner->PublishOnDate) {
            return false;
        }
        $now = DBDatetime::now()->getTimestamp();
        $publish = $this->owner->dbObject('PublishOnDate')->getTimestamp();

        return $now < $publish;
    }
712719
private boolean isInRecord(String[] strClassNames, int iClassIndex, String strRecordClass)
    {
        boolean bIsInRecord = false;
        for (int i = 0; i <= iClassIndex; i++)
        {
            if (strClassNames[i].equalsIgnoreCase(strRecordClass))
                bIsInRecord = true;   // True, it IS in the record
        }
        return bIsInRecord;    // It is in the record?
    }
1112841
public function isPublishedNice()
    {
        $field = DBBoolean::create('isPublished');
        $field->setValue($this->isPublished());

        return $field->Nice();
    }
247603
public function setRecordCollectionAction(Request $request, $databox_id, $record_id)
    {
        $databox = $this->findDataboxById($databox_id);
        $record = $databox->get_record($record_id);

        try {
            $collection = \collection::getByBaseId($this->app, $request->get('base_id'));
            $record->move_to_collection($collection, $this->getApplicationBox());

            return Result::create($request, ["record" => $this->listRecord($request, $record)])->createResponse();
        } catch (\Exception $e) {
            return $this->getBadRequestAction($request, $e->getMessage());
        }
    }
756880
function is_site_delegated_connection( $blog_id = 0 ) {
            if ( ! $this->_is_network_active ) {
                return false;
            }

            if ( 0 == $blog_id ) {
                $blog_id = get_current_blog_id();
            }

            return $this->_storage->get( 'is_delegated_connection', false, $blog_id );
        }