_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 33 8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q23300 | SearchProvider.getItemsPerPageSession | train | public function getItemsPerPageSession()
{
$variable = 'search/' . $this->getSessionNamespace() . '/items_per_page';
if ($this->session->has($variable)) {
| php | {
"resource": ""
} |
q23301 | Thumbnailer.attemptBuild | train | private function attemptBuild(File $file, array $thumbnail)
{
try {
// If the file is already built, return early
if ($this->isBuilt($file, $thumbnail)) {
return true;
}
// Otherwise lets attempt to build it
if ($dimensions = $this... | php | {
"resource": ""
} |
q23302 | Thumbnailer.getDimensions | train | private function getDimensions($thumbnail)
{
$matches = null;
if (preg_match('/^ccm_(\d+)x(\d+)(?:_([10]))?$/', | php | {
"resource": ""
} |
q23303 | DateTime.selectNearestValue | train | protected function selectNearestValue(array $values, $wantedValue)
{
if (in_array($wantedValue, $values)) {
$result = $wantedValue;
} else {
$result = null;
$minDelta = PHP_INT_MAX;
foreach ($values as $value) {
| php | {
"resource": ""
} |
q23304 | RegistrationService.getNewUsernameFromUserDetails | train | public function getNewUsernameFromUserDetails($email, $suggestedUsername = '', $firstName = '', $lastName = '')
{
$baseUsername = $this->stringToUsernameChunk($suggestedUsername);
if ($baseUsername === '') {
$firstName = $this->stringToUsernameChunk($firstName);
$lastName = $... | php | {
"resource": ""
} |
q23305 | DefaultManager.getIndexes | train | public function getIndexes($type, $includeGlobal=true)
{
// Yield all indexes registered against this type
if (isset($this->indexes[$type])) {
foreach ($this->indexes[$type] as $index) {
yield $type => $this->inflateIndex($index);
}
}
$all = s... | php | {
"resource": ""
} |
q23306 | DefaultManager.inflateIndex | train | protected function inflateIndex($class)
{
if ($class instanceof IndexInterface) {
return $class;
| php | {
"resource": ""
} |
q23307 | DefaultManager.getAllIndexes | train | public function getAllIndexes()
{
foreach ($this->indexes as $type => $indexList) {
// If we hit the "ALL" type, skip it for now
if ($type == self::TYPE_ALL) {
continue;
| php | {
"resource": ""
} |
q23308 | DefaultManager.addIndex | train | public function addIndex($type, $index)
{
if (!isset($this->indexes[$type])) {
$this->indexes[$type] = [];
| php | {
"resource": ""
} |
q23309 | DefaultManager.index | train | public function index($type, $object)
{
foreach ($this->getIndexes($type) as $index) {
| php | {
"resource": ""
} |
q23310 | DefaultManager.forget | train | public function forget($type, $object)
{
foreach ($this->getIndexes($type) as $index) {
| php | {
"resource": ""
} |
q23311 | Legacy.deleteFormAnswers | train | private function deleteFormAnswers($qsID)
{
$db = Loader::db();
$v = [intval($qsID)];
$q = 'SELECT asID FROM btFormAnswerSet WHERE questionSetId = ?';
$r = $db->query($q, $v);
| php | {
"resource": ""
} |
q23312 | Legacy.deleteForm | train | private function deleteForm($bID, $qsID)
{
$db = Loader::db();
$this->deleteFormAnswers($qsID);
$v = [intval($bID)];
$q = 'DELETE FROM btFormQuestions | php | {
"resource": ""
} |
q23313 | Controller.viewRequiresJqueryUI | train | private function viewRequiresJqueryUI()
{
$whereInputTypes = "inputType = 'date' OR inputType = 'datetime'";
$sql = "SELECT COUNT(*) FROM {$this->btQuestionsTablename} WHERE questionSetID = ? AND bID = ? AND ({$whereInputTypes})";
| php | {
"resource": ""
} |
q23314 | Controller.view | train | public function view()
{
if ($this->viewRequiresJqueryUI()) {
$this->requireAsset('jquery/ui');
}
$this->requireAsset('css', 'core/frontend/errors');
| php | {
"resource": ""
} |
q23315 | Controller.questionVersioning | train | protected function questionVersioning($data = [])
{
$data += [
'ignoreQuestionIDs' => '',
'pendingDeleteIDs' => '',
];
$db = Database::connection();
$oldBID = intval($data['bID']);
//if this block is being edited a second time, remove edited questions... | php | {
"resource": ""
} |
q23316 | Statistics.incrementParents | train | public static function incrementParents($cID)
{
$db = Loader::db();
$cParentID = $db->GetOne("select cParentID from Pages where cID = ?", | php | {
"resource": ""
} |
q23317 | Statistics.decrementParents | train | public static function decrementParents($cID)
{
$db = Loader::db();
$cParentID = $db->GetOne("select cParentID from Pages where cID = ?", array($cID));
$cChildren = $db->GetOne("select cChildren from Pages where cID = | php | {
"resource": ""
} |
q23318 | Statistics.getTotalPagesCreated | train | public static function getTotalPagesCreated($date)
{
$db = Loader::db();
$num = $db->GetOne('select count(Pages.cID) from Pages inner | php | {
"resource": ""
} |
q23319 | Geolocator.create | train | public static function create($handle, $name, Package $package = null)
{
$result = new static();
$result
->setGeolocatorHandle($handle)
->setGeolocatorName($name)
->setGeolocatorDescription('')
| php | {
"resource": ""
} |
q23320 | Geolocator.getGeolocatorDisplayName | train | public function getGeolocatorDisplayName($format = 'html')
{
$value = tc('GeolocatorName', $this->getGeolocatorName());
switch ($format) {
case 'html':
| php | {
"resource": ""
} |
q23321 | Geolocator.getGeolocatorDisplayDescription | train | public function getGeolocatorDisplayDescription($format = 'html')
{
$value = tc('GeolocatorDescription', $this->getGeolocatorDescription());
switch ($format) {
case 'html':
| php | {
"resource": ""
} |
q23322 | Entry.getEntryAssociation | train | public function getEntryAssociation(Association $association)
{
$id = $association->getId();
/**
* @var EntryAssociation $entryAssociation
*/
foreach ($this->associations as $entryAssociation) {
if | php | {
"resource": ""
} |
q23323 | Style.getFormElementPath | train | public function getFormElementPath()
{
$className = implode('', array_slice(explode('\\', get_called_class()), -1));
$segment = substr($className, 0, strpos($className, 'Style'));
| php | {
"resource": ""
} |
q23324 | EventOccurrenceService.getByOccurrenceID | train | public function getByOccurrenceID($occurrenceID, $retrieveVersion = EventService::EVENT_VERSION_APPROVED)
{
if ($retrieveVersion == EventService::EVENT_VERSION_RECENT) {
$query = $this->entityManager->createQuery('select vo from calendar:CalendarEventVersionOccurrence vo JOIN
vo.version v JO... | php | {
"resource": ""
} |
q23325 | Html.noFollowHref | train | public function noFollowHref($input)
{
return preg_replace_callback(
'/(?:<a(.*?href.*?)>)/i',
function ($matches) {
if (strpos($matches[1], 'rel="nofollow"') === false) {
//if there is no nofollow add it
return '<a' . $matches[... | php | {
"resource": ""
} |
q23326 | ScopeRepository.finalizeScopes | train | public function finalizeScopes(
array $scopes,
$grantType,
ClientEntityInterface $clientEntity,
$userIdentifier = null
) {
$app = Facade::getFacadeApplication();
$allowedScopes = $app->make('config')->get('app.api.scopes');
$winnowed = [];
foreach ($sc... | php | {
"resource": ""
} |
q23327 | ServiceProvider.add | train | private function add($param, $requireInstall = false, callable $callback = null)
{
// Handle array input
if (is_array($param)) {
foreach ($param as $item) {
$this->add($item, $requireInstall, $callback);
}
return null;
}
// If we'... | php | {
"resource": ""
} |
q23328 | ServiceProvider.installed | train | private function installed()
{
if ($this->installed === null) { | php | {
"resource": ""
} |
q23329 | SymbolGenerator.registerClass | train | public function registerClass($alias, $class)
{
$classSymbol = new ClassSymbol($alias, $class);
$this->classes[$alias] = $classSymbol;
$aliasNamespace = $classSymbol->getAliasNamespace();
| php | {
"resource": ""
} |
q23330 | SymbolGenerator.render | train | public function render($eol = "\n", $padding = ' ', $methodFilter = null)
{
$lines = [];
$lines[] = '<?php';
$lines[] = '';
$lines[] = '// Generated on ' . date('c');
foreach ($this->aliasNamespaces as $namespace) {
$lines[] = '';
$lines[] = rtrim("... | php | {
"resource": ""
} |
q23331 | Controller.required_password_upgrade | train | public function required_password_upgrade()
{
$email = $this->post('uEmail');
$token = $this->app->make(Token::class);
$this->set('token', $token);
if ($email) {
$errorValidator = Core::make('helper/validation/error');
$userInfo = Core::make('Concrete\Core\Us... | php | {
"resource": ""
} |
q23332 | LabelFormatter.format | train | public function format($mask, Entry $entry)
{
return $this->formatter->format($mask, function ($key) use ($entry) {
if ($key === 'id') {
return $entry->getID();
}
$attribute = $entry->getAttribute($key);
if ($attribute) {
... | php | {
"resource": ""
} |
q23333 | Block.getByName | train | public static function getByName($blockName)
{
if (!$blockName) {
return;
}
$app = Application::getFacadeApplication();
$now = $app->make('date')->getOverridableNow();
$db = Loader::db();
$sql = <<<'EOT'
SELECT
b.bID,
cvb.arHandle,
cvb.cID
FROM... | php | {
"resource": ""
} |
q23334 | Block.populateManually | train | public static function populateManually($blockInfo, $c, $a)
{
$b = new self();
$b->setPropertiesFromArray($blockInfo);
if (is_object($a)) {
$b->a = $a;
$b->arHandle = $a->getAreaHandle();
} else {
if ($a != null) {
| php | {
"resource": ""
} |
q23335 | Block.getCollectionList | train | public function getCollectionList()
{
$cArray = [];
$bID = $this->getBlockID();
if ($bID) {
$db = Loader::db();
$q = 'select DISTINCT Pages.cID from CollectionVersionBlocks inner join Pages on (CollectionVersionBlocks.cID = Pages.cID) inner join CollectionVersions on ... | php | {
"resource": ""
} |
q23336 | Block.setBlockCollectionObject | train | public function setBlockCollectionObject($c)
{
| php | {
"resource": ""
} |
q23337 | Block.setBlockAreaObject | train | public function setBlockAreaObject(&$a)
{
$this->a = $a;
| php | {
"resource": ""
} |
q23338 | Block.setAbsoluteBlockDisplayOrder | train | public function setAbsoluteBlockDisplayOrder($do)
{
$db = Loader::db();
$cID = $this->getBlockCollectionID();
$bID = $this->getBlockID();
$arHandle = $this->getAreaHandle();
$c = $this->getBlockCollectionObject();
$cvID = $c->getVersionID();
$q = 'update Co... | php | {
"resource": ""
} |
q23339 | Block.isEditable | train | public function isEditable()
{
$bv = new BlockView($this);
$path = $bv->getBlockPath(FILENAME_BLOCK_EDIT);
if | php | {
"resource": ""
} |
q23340 | Block.deactivate | train | public function deactivate()
{
$db = Loader::db();
$q = 'update Blocks set bIsActive = 0 where | php | {
"resource": ""
} |
q23341 | Block.activate | train | public function activate()
{
$db = Loader::db();
$q = 'update Blocks set bIsActive = 1 where bID | php | {
"resource": ""
} |
q23342 | Block.isAlias | train | public function isAlias($c = null)
{
if ($c) {
$db = Loader::db();
$cID = $c->getCollectionID();
$vo = $c->getVersionObject();
$cvID = $vo->getVersionID();
$q = 'select bID from CollectionVersionBlocks where bID = ? and cID=? and isOriginal = 0 and... | php | {
"resource": ""
} |
q23343 | Block.getNumChildren | train | public function getNumChildren()
{
$db = Loader::db();
$q = 'select count(*) as total from CollectionVersionBlocks where bID = ? and isOriginal = 0';
| php | {
"resource": ""
} |
q23344 | Block.isBlockInStack | train | public function isBlockInStack()
{
$co = $this->getBlockCollectionObject();
if (is_object($co)) {
if ($co->getPageTypeHandle() == STACKS_PAGE_TYPE) { | php | {
"resource": ""
} |
q23345 | Block.getCustomStyleSetID | train | public function getCustomStyleSetID()
{
$db = Loader::db();
if (!isset($this->issID)) {
$co = $this->getBlockCollectionObject();
$arHandle = $this->getAreaHandle();
if ($arHandle) {
$a = $this->getBlockAreaObject();
if ($a->isGloba... | php | {
"resource": ""
} |
q23346 | Block.getCustomStyle | train | public function getCustomStyle($force = false)
{
if ($this->getCustomStyleSetID() > 0 || $force) {
$csr = StyleSet::getByID($this->getCustomStyleSetID());
$theme = $this->c->getCollectionThemeObject();
| php | {
"resource": ""
} |
q23347 | Block.setCustomStyleSet | train | public function setCustomStyleSet(\Concrete\Core\Entity\StyleCustomizer\Inline\StyleSet $set)
{
$db = Loader::db();
$c = $this->getBlockCollectionObject();
$cvID = $c->getVersionID();
$db->Replace(
'CollectionVersionBlockStyles',
[
'cID' => $th... | php | {
"resource": ""
} |
q23348 | Block.resetCustomStyle | train | public function resetCustomStyle()
{
$db = Loader::db();
$c = $this->getBlockCollectionObject();
$cvID = $c->getVersionID();
$db->Execute(
'delete from CollectionVersionBlockStyles where cID = ? and cvID = ? and arHandle = ? and bID = ?',
[
| php | {
"resource": ""
} |
q23349 | Block.getBlockCacheSettingsObject | train | public function getBlockCacheSettingsObject()
{
if ($this->cacheSettings === | php | {
"resource": ""
} |
q23350 | Block.setCustomCacheSettings | train | public function setCustomCacheSettings($enabled, $enabledOnPost, $enabledForRegistered, $lifetime)
{
$db = Loader::db();
$c = $this->getBlockCollectionObject();
$cvID = $c->getVersionID();
$enabled = (bool) $enabled;
$enabledOnPost = (bool) $enabledOnPost;
$enabledFo... | php | {
"resource": ""
} |
q23351 | Block.resetCustomCacheSettings | train | public function resetCustomCacheSettings()
{
$db = Loader::db();
$c = $this->getBlockCollectionObject();
$cvID = $c->getVersionID();
$db->update(
'CollectionVersionBlocks',
['cbOverrideBlockTypeCacheSettings' => 0],
[
'cID' => $this... | php | {
"resource": ""
} |
q23352 | Block.setBlockCachedOutput | train | public function setBlockCachedOutput($content, $lifetime, $area)
{
$db = Loader::db();
$c = $this->getBlockCollectionObject();
$btCachedBlockOutputExpires = strtotime('+5 years');
if ($lifetime > 0) {
$btCachedBlockOutputExpires = time() + $lifetime;
}
$... | php | {
"resource": ""
} |
q23353 | Block.refreshBlockOutputCache | train | public function refreshBlockOutputCache()
{
$db = Loader::db();
$cID = $this->getBlockCollectionID();
$bID = $this->getBlockID();
$c = $this->getBlockCollectionObject();
$v = [$c->getCollectionID(), $c->getVersionID(), $this->getAreaHandle(), $bID];
$db->Execute(
... | php | {
"resource": ""
} |
q23354 | Block.refreshBlockRecordCache | train | public function refreshBlockRecordCache()
{
$app = Application::getFacadeApplication();
$db = $app->make(Connection::class);
| php | {
"resource": ""
} |
q23355 | Block.overrideAreaPermissions | train | public function overrideAreaPermissions()
{
if (!isset($this->cbOverrideAreaPermissions) || !$this->cbOverrideAreaPermissions) {
| php | {
"resource": ""
} |
q23356 | Block.revertToAreaPermissions | train | public function revertToAreaPermissions()
{
$c = $this->getBlockCollectionObject();
$db = Loader::db();
$v = [$c->getCollectionID(), $c->getVersionID(), $this->getBlockID()];
$db->query('delete from BlockPermissionAssignments where cID = ? and cvID = ? and bID = ?', $v);
$v... | php | {
"resource": ""
} |
q23357 | Block.ignorePageThemeGridFrameworkContainer | train | public function ignorePageThemeGridFrameworkContainer()
{
if ($this->overrideBlockTypeContainerSettings()) {
| php | {
"resource": ""
} |
q23358 | Block.overrideBlockTypeContainerSettings | train | public function overrideBlockTypeContainerSettings()
{
if (!isset($this->cbOverrideBlockTypeContainerSettings) || !$this->cbOverrideBlockTypeContainerSettings) {
| php | {
"resource": ""
} |
q23359 | Block.getController | train | public function getController()
{
if (
Config::get('concrete.cache.blocks')
&& isset($this->instance)
&& $this->instance->cacheBlockRecord()
&& is_object($this->instance->getBlockControllerData())
) {
$this->instance->__construct();
| php | {
"resource": ""
} |
q23360 | Block.display | train | public function display($view = 'view')
{
if ($this->getBlockTypeID() < 1) | php | {
"resource": ""
} |
q23361 | Block.update | train | public function update($data)
{
$db = Loader::db();
$dh = Loader::helper('date');
$bDateModified = $dh->getOverridableNow();
$bID = $this->getBlockID();
$v = [$bDateModified, $bID];
$q = 'update Blocks set bDateModified = ? where bID = ?';
$r = $db->prepare(... | php | {
"resource": ""
} |
q23362 | Block.updateBlockInformation | train | public function updateBlockInformation($data)
{
// this is the function that
$db = Loader::db();
$dh = Loader::helper('date');
$dt = $dh->getOverridableNow();
$bName = $this->getBlockName();
$bFilename = $this->getBlockFilename();
if (isset($data['bName'])) {... | php | {
"resource": ""
} |
q23363 | Block.alias | train | public function alias($c)
{
$app = Application::getFacadeApplication();
$cloner | php | {
"resource": ""
} |
q23364 | Block.export | train | public function export($node, $exportType = 'full')
{
if (!$this->isAliasOfMasterCollection() || (($this->c instanceof Page) && $this->c->isMasterCollection())) {
// We have the OR up here so that master collections that you have duplicated from other
// master collections export pro... | php | {
"resource": ""
} |
q23365 | Block.queueForDefaultsUpdate | train | public function queueForDefaultsUpdate($data, $queue, $includeThisBlock = true)
{
$blocks = [];
$db = \Database::connection();
$rows = $db->GetAll('select cID, max(cvID) as cvID, cbRelationID from CollectionVersionBlocks where cbRelationID = ? group by cID order by cID', [$this->getBlockRela... | php | {
"resource": ""
} |
q23366 | Version.refreshCache | train | public function refreshCache()
{
$app = Facade::getFacadeApplication();
$cache = $app->make('cache/request');
if ($cache->isEnabled()) {
| php | {
"resource": ""
} |
q23367 | Version.get | train | public static function get($c, $cvID)
{
$app = Facade::getFacadeApplication();
$db = $app->make('database')->connection();
$now = $app->make('date')->getOverridableNow();
$cID = false;
if ($c instanceof \Concrete\Core\Page\Page) {
$cID = $c->getCollectionPointerI... | php | {
"resource": ""
} |
q23368 | Version.isApprovedNow | train | public function isApprovedNow($when = null)
{
if (!$this->isApproved()) {
return false;
}
$start = $this->getPublishDate();
$end = $this->getPublishEndDate();
if (!$start && !$end) {
return true;
}
$dh = Facade::getFacadeApplication()->... | php | {
"resource": ""
} |
q23369 | Version.isMostRecent | train | public function isMostRecent()
{
if (!isset($this->isMostRecent)) {
$app = Facade::getFacadeApplication();
$db = $app->make('database')->connection();
$cvID = $db->fetchColumn('select cvID from CollectionVersions | php | {
"resource": ""
} |
q23370 | Version.getCustomAreaStyles | train | public function getCustomAreaStyles()
{
if (!isset($this->customAreaStyles)) {
$app = Facade::getFacadeApplication();
$db = $app->make('database')->connection();
$r = $db->fetchAll('select issID, arHandle from CollectionVersionAreaStyles where cID = ? | php | {
"resource": ""
} |
q23371 | Version.setComment | train | public function setComment($comment)
{
$thisCVID = $this->getVersionID();
$comment = ($comment != null) ? $comment : "Version {$thisCVID}";
$v = array(
$comment,
$thisCVID,
$this->cID,
);
$app = | php | {
"resource": ""
} |
q23372 | Version.createNew | train | public function createNew($versionComments)
{
$app = Facade::getFacadeApplication();
$cloner = $app->make(Cloner::class);
$clonerOptions = $app->build(ClonerOptions::class)
->setCopyContents(false)
->setVersionComments($versionComments)
;
| php | {
"resource": ""
} |
q23373 | Version.discard | train | public function discard()
{
if ($this->isNew()) {
$app = Facade::getFacadeApplication();
$db = $app->make('database')->connection();
// check for related version edits. This only gets applied when we edit global areas.
$r = $db->executeQuery('select cRelationI... | php | {
"resource": ""
} |
q23374 | Version.canDiscard | train | public function canDiscard()
{
$result = false;
if ($this->isNew()) {
$app = Facade::getFacadeApplication();
$db = $app->make('database')->connection();
$total = $db->fetchColumn('select count(cvID) from CollectionVersions where cID = ?', array(
| php | {
"resource": ""
} |
q23375 | Version.removeNewStatus | train | public function removeNewStatus()
{
$app = Facade::getFacadeApplication();
$db = $app->make('database')->connection();
$db->executeQuery("update CollectionVersions set cvIsNew = 0 where cID = ? | php | {
"resource": ""
} |
q23376 | Version.deny | train | public function deny()
{
$app = Facade::getFacadeApplication();
$db = $app->make('database')->connection();
$cvID = $this->cvID;
$cID = $this->cID;
// first we update a collection updated record
$dh = $app->make('helper/date');
$db->executeQuery('update Colle... | php | {
"resource": ""
} |
q23377 | SitemapWriter.getSitemapGenerator | train | public function getSitemapGenerator()
{
if ($this->sitemapGenerator === null) {
| php | {
"resource": ""
} |
q23378 | SitemapWriter.getOutputFilename | train | public function getOutputFilename()
{
$result = $this->outputFilename;
if ($result === '') {
$config = $this->app->make('config');
$relativeName = '/' . ltrim(str_replace(DIRECTORY_SEPARATOR, '/', (string) | php | {
"resource": ""
} |
q23379 | SitemapWriter.getSitemapUrl | train | public function getSitemapUrl()
{
$outputFilename = $this->getOutputFilename();
if (strpos($outputFilename, DIR_BASE . '/') === 0) {
$result = (string) | php | {
"resource": ""
} |
q23380 | SitemapWriter.getTemporaryDirectory | train | protected function getTemporaryDirectory()
{
$result = $this->temporaryDirectory;
if ($result === '') {
$fileHelper = $this->app->make('helper/file');
$temporaryDirectory = (string) $fileHelper->getTemporaryDirectory();
if ($temporaryDirectory === '' || !$this->fi... | php | {
"resource": ""
} |
q23381 | AbstractFormatter.getEntryDisplayName | train | public function getEntryDisplayName(AssociationControl $control, Entry $entry)
{
$formatter = $this->getEntryFormatter();
$name = null;
// Do we have a custom display mask? If so, we try to use that
if ($mask = $control->getAssociationEntityLabelMask()) {
$name = $format... | php | {
"resource": ""
} |
q23382 | AbstractFormatter.getEntryFormatter | train | protected function getEntryFormatter()
{
if (!$this->entryFormatter) {
$this->entryFormatter | php | {
"resource": ""
} |
q23383 | CoreDriver.getDriver | train | public function getDriver()
{
$annotationDriver = new AnnotationDriver($this->app->make('orm/cachedAnnotationReader'), [
DIR_BASE_CORE . '/' . DIRNAME_CLASSES | php | {
"resource": ""
} |
q23384 | AuthenticationType.getList | train | public static function getList($sorted = false, $activeOnly = false)
{
$list = [];
$db = Loader::db();
$q = $db->query('SELECT * FROM AuthenticationTypes'
. ($activeOnly ? ' WHERE authTypeIsEnabled=1 ' : '')
. ' ORDER | php | {
"resource": ""
} |
q23385 | AuthenticationType.load | train | public static function load($arr)
{
$extract = [
'authTypeID',
'authTypeName',
'authTypeHandle',
'authTypeDisplayOrder',
'authTypeIsEnabled',
| php | {
"resource": ""
} |
q23386 | AuthenticationType.loadController | train | protected function loadController()
{
$env = Environment::get();
$r = $env->getRecord(DIRNAME_AUTHENTICATION . '/' . $this->authTypeHandle . '/' . FILENAME_CONTROLLER);
$prefix = $r->override ? true : $this->getPackageHandle();
$authTypeHandle = Core::make('helper/text')->camelcase($... | php | {
"resource": ""
} |
q23387 | AuthenticationType.getByHandle | train | public static function getByHandle($atHandle)
{
$db = Loader::db();
$row = $db->GetRow('SELECT * FROM AuthenticationTypes WHERE authTypeHandle=?', [$atHandle]);
if (!$row) {
| php | {
"resource": ""
} |
q23388 | AuthenticationType.getByID | train | public static function getByID($authTypeID)
{
$db = Loader::db();
$row = $db->GetRow('SELECT * FROM AuthenticationTypes where authTypeID=?', [$authTypeID]);
if (!$row) {
| php | {
"resource": ""
} |
q23389 | AuthenticationType.setAuthenticationTypeName | train | public function setAuthenticationTypeName($authTypeName)
{
$db = Loader::db();
$db->Execute(
| php | {
"resource": ""
} |
q23390 | AuthenticationType.getAuthenticationTypeFilePath | train | public function getAuthenticationTypeFilePath($_file)
{
$f = $this->mapAuthenticationTypeFilePath($_file);
if | php | {
"resource": ""
} |
q23391 | AuthenticationType.renderForm | train | public function renderForm($element = 'form', $params = [])
{
$this->controller->requireAsset('javascript', 'backstretch');
$form_element = $this->mapAuthenticationTypeFilePath($element . '.php');
if (!$form_element->exists()) {
$form_element = $this->mapAuthenticationTypeFilePa... | php | {
"resource": ""
} |
q23392 | AuthenticationType.renderHook | train | public function renderHook()
{
$form_hook = $this->mapAuthenticationTypeFilePath('hook.php');
if (method_exists($this->controller, 'hook') || $form_hook->exists()) {
ob_start();
if (method_exists($this->controller, 'hook')) {
$this->controller->hook();
... | php | {
"resource": ""
} |
q23393 | AuthenticationType.renderHooked | train | public function renderHooked()
{
$form_hooked = $this->mapAuthenticationTypeFilePath('hooked.php');
if (method_exists($this->controller, 'hooked') || $form_hooked->exists()) {
ob_start();
if (method_exists($this->controller, 'hooked')) {
$this->controller->hoo... | php | {
"resource": ""
} |
q23394 | AuthenticationType.isHooked | train | public function isHooked($user)
{
$result = null;
if (is_callable([$this->controller, 'getBindingForUser'])) { | php | {
"resource": ""
} |
q23395 | Type.save | train | public function save()
{
$em = Application::getFacadeApplication()->make(EntityManagerInterface::class);
| php | {
"resource": ""
} |
q23396 | ApplicationDriver.getDriver | train | public function getDriver()
{
$config = $this->config;
if ($this->isLegacy()) {
$appEntityPath = DIR_APPLICATION . '/' . DIRNAME_CLASSES;
$reader = $this->app->make('orm/cachedSimpleAnnotationReader');
} else {
$appEntityPath = DIR_APPLICATION . '/' . DIRN... | php | {
"resource": ""
} |
q23397 | Zip.isNativeCommandAvailable | train | public function isNativeCommandAvailable($command)
{
switch ($command) {
case 'zip':
case 'unzip':
break;
default:
return false;
}
if (!isset($this->availableNativeCommands[$command])) {
$this->availableNativeCom... | php | {
"resource": ""
} |
q23398 | Zip.unzip | train | public function unzip($zipFile, $destinationDirectory, array $options = [])
{
$fs = $this->getFilesystem();
$normalized = @realpath($zipFile);
if ($normalized === false || !$fs->isFile($normalized)) {
throw new Exception(t('Unable to find the ZIP file %s', $zipFile));
}
... | php | {
"resource": ""
} |
q23399 | Zip.zip | train | public function zip($sourceDirectory, $zipFile, array $options = [])
{
$fs = $this->getFilesystem();
$normalized = @realpath($sourceDirectory);
if ($normalized === false || !$fs->isDirectory($normalized)) {
throw new Exception(t('Unable to find the directory %s', $sourceDirectory... | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.