Load the Inbound Message handler details for a given record.

@param \stdClass $record The record to retrieve the handler for.
@return \core\message\inbound\handler or false
4628
protected static function handler_from_record($record) {
        $classname = $record->classname;
        if (strpos($classname, '\\') !== 0) {
            $classname = '\\' . $classname;
        }
        if (!class_exists($classname)) {
            return false;
        }

        $handler = new $classname;
        if (isset($record->id)) {
            $handler->set_id($record->id);
        }
        $handler->set_component($record->component);

        // Overload fields which can be modified.
        if (isset($record->defaultexpiration)) {
            $handler->set_defaultexpiration($record->defaultexpiration);
        }

        if (isset($record->validateaddress)) {
            $handler->set_validateaddress($record->validateaddress);
        }

        if (isset($record->enabled)) {
            $handler->set_enabled($record->enabled);
        }

        return $handler;
    }
1106564
public function getRecordUrl($record)
    {
        if (isset($this->recordOnClick)) {
            return 'javascript:;';
        }

        if (!isset($this->recordUrl)) {
            return null;
        }

        $url = RouterHelper::replaceParameters($record, $this->recordUrl);
        return Backend::url($url);
    }
605630
public function isHandling(array $record)
    {
        if (empty($this->levels)) {
            return true;
        }

        return in_array($record['level'], $this->levels);
    }
891766
public function processRecord(array $record)
    {
        if (is_null($this->requestId)) {
            $this->requestId = uniqid('');
        }

        $record['extra']['requestId'] = $this->requestId;

        return $record;
    }
548974
protected function handlesGrant($record, $grantType)
    {
        if (is_array($record->grant_types) && ! in_array($grantType, $record->grant_types)) {
            return false;
        }

        switch ($grantType) {
            case 'authorization_code':
                return ! $record->firstParty();
            case 'personal_access':
                return $record->personal_access_client;
            case 'password':
                return $record->password_client;
            case 'client_credentials':
                return ! empty($record->secret);
            default:
                return true;
        }
    }
893563
public function get_author_from_stdclass(stdClass $record) : author_entity {
        return new author_entity(
            $record->id,
            $record->picture,
            $record->firstname,
            $record->lastname,
            fullname($record),
            $record->email,
            $record->middlename,
            $record->firstnamephonetic,
            $record->lastnamephonetic,
            $record->alternatename,
            $record->imagealt
        );
    }
132366
protected function transformRecord($record)
    {
        $columnNames = $this->columnManager->getRequestedColumnNames();
        $columnNames->transform(function ($item) use ($record) {
            return $this->getColumnValue($item, $record);
        });

        $datatableParameters = $this->getDatatableParameters($record);

        return array_merge($datatableParameters, $columnNames->toArray());
    }
361386
public function getRecordOnClick($record)
    {
        if (!isset($this->recordOnClick)) {
            return null;
        }

        $recordOnClick = RouterHelper::replaceParameters($record, $this->recordOnClick);
        return Html::attributes(['onclick' => $recordOnClick]);
    }
291183
public static function load_from_record($record, $clean = false) {
        $step = new self();
        return $step->reload_from_record($record, $clean);
    }
901079
protected static function createFromRecord($record)
    {
        if (is_array($record) && $record['cnvEditorHandle']) {
            /** @var \Concrete\Core\Utility\Service\Text $textHelper */
            $textHelper = Core::make('helper/text');
            $class = '\\Concrete\\Core\\Conversation\\Editor\\' . $textHelper->camelcase(
                    $record['cnvEditorHandle']
                ) . 'Editor';
            /** @var Editor $sc Really this could be any kind of editor but this should help code completion a bit */
            $sc = Core::make($class);
            $sc->setPropertiesFromArray($record);

            return $sc;
        }

        return null;
    }
781223
public function getDatatableParameters($record)
    {
        $datatableParameters = [
            'DT_RowId' => config('laratables.row_id_prefix').$record->{$record->getKeyName()},
        ];

        if (method_exists($this->class, 'laratablesRowClass')) {
            $datatableParameters['DT_RowClass'] = $record->laratablesRowClass();
        }

        if (method_exists($this->class, 'laratablesRowData')) {
            $datatableParameters['DT_RowData'] = $record->laratablesRowData();
        }

        return $datatableParameters;
    }
422111
public function pushRecord(Record $record)
    {
        $this->records[] = $record;

        if (!$record->getType()->isStdin() || $record->getContent()) {
            return;
        }

        return $this->buildRequest();
    }
268948
public function addRecord($record)
    {
        if ((isset($this->DBFHeader)) && (is_array($this->DBFHeader))) {
            $record->updateDBFInfo($this->DBFHeader);
        }

        $this->fileLength += ($record->getContentLength() + 4);
        $this->records[] = $record;
        $this->records[count($this->records) - 1]->recordNumber = count($this->records);

        $this->updateBBox('x', $record->SHPData);
        $this->updateBBox('y', $record->SHPData);

        if (in_array($this->shapeType, [11, 13, 15, 18, 21, 23, 25, 28])) {
            $this->updateBBox('m', $record->SHPData);
        }

        if (in_array($this->shapeType, [11, 13, 15, 18])) {
            $this->updateBBox('z', $record->SHPData);
        }

        return count($this->records) - 1;
    }
614666
private function detectRecord($record)
    {
        foreach ($this->recordTypes as $recordType) {
            $method = new ReflectionMethod($recordType, 'match');
            $arguments = [$record];

            if ($method->invokeArgs(null, $arguments) === false) {
                continue;
            }

            $class = $method->getDeclaringClass();

            return ($class->hasMethod('__construct'))
                ? $class->newInstanceArgs($arguments) : $class->newInstance();
        }

        throw new UnexpectedValueException();
    }
1371166
public function get_document($record, $options = array()) {

        try {
            $cm = $this->get_cm('forum', $record->forumid, $record->courseid);
            $context = \context_module::instance($cm->id);
        } catch (\dml_missing_record_exception $ex) {
            // Notify it as we run here as admin, we should see everything.
            debugging('Error retrieving ' . $this->areaid . ' ' . $record->id . ' document, not all required data is available: ' .
                $ex->getMessage(), DEBUG_DEVELOPER);
            return false;
        } catch (\dml_exception $ex) {
            // Notify it as we run here as admin, we should see everything.
            debugging('Error retrieving ' . $this->areaid . ' ' . $record->id . ' document: ' . $ex->getMessage(), DEBUG_DEVELOPER);
            return false;
        }

        // Prepare associative array with data from DB.
        $doc = \core_search\document_factory::instance($record->id, $this->componentname, $this->areaname);
        $doc->set('title', content_to_text($record->subject, false));
        $doc->set('content', content_to_text($record->message, $record->messageformat));
        $doc->set('contextid', $context->id);
        $doc->set('courseid', $record->courseid);
        $doc->set('userid', $record->userid);
        $doc->set('owneruserid', \core_search\manager::NO_OWNER_ID);
        $doc->set('modified', $record->modified);

        // Store group id if there is one. (0 and -1 both mean not restricted to group.)
        if ($record->groupid > 0) {
            $doc->set('groupid', $record->groupid);
        }

        // Check if this document should be considered new.
        if (isset($options['lastindexedtime']) && ($options['lastindexedtime'] < $record->created)) {
            // If the document was created after the last index time, it must be new.
            $doc->set_is_new(true);
        }

        return $doc;
    }
1243015
final public function from_record(stdClass $record) {
        $record = (array) $record;
        foreach ($record as $property => $value) {
            $this->raw_set($property, $value);
        }
        return $this;
    }
1137415
protected function getIsGarbageRecord($table, $record):bool
    {
        return $this->tcaService->isHidden($table, $record) ||
                $this->isInvisibleByStartOrEndtime($table, $record) ||
                $this->hasFrontendGroupsRemoved($table, $record) ||
                ($table === 'pages' && $this->isPageExcludedFromSearch($record)) ||
                ($table === 'pages' && !$this->isIndexablePageType($record));
    }