_id
stringlengths
2
7
title
stringlengths
3
151
partition
stringclasses
3 values
text
stringlengths
33
8k
language
stringclasses
1 value
meta_information
dict
q23700
BlockType.installBlockType
train
public static function installBlockType($btHandle, $pkg = false) { $app = Application::getFacadeApplication(); $em = $app->make(EntityManagerInterface::class); $pkgHandle = (string) (is_object($pkg) ? $pkg->getPackageHandle() : $pkg); $class = static::getBlockTypeMappedClass($btHandl...
php
{ "resource": "" }
q23701
BlockType.getBlockTypeMappedClass
train
public static function getBlockTypeMappedClass($btHandle, $pkgHandle = false) { $app = Application::getFacadeApplication(); $txt = $app->make('helper/text'); $pkgHandle = (string) $pkgHandle; $locator = $app->make(FileLocator::class); if ($pkgHandle !== '') { $lo...
php
{ "resource": "" }
q23702
BlockType.clearCache
train
public static function clearCache() { $app = Application::getFacadeApplication(); $db = $app->make(Connection::class); $sm = $db->getSchemaManager(); $tableNames = array_map('strtolower', $sm->listTableNames()); if (in_array('config', $tableNames, true)) { $platfo...
php
{ "resource": "" }
q23703
TranslationsInstaller.installMissingPackageTranslations
train
public function installMissingPackageTranslations(Package $package) { // Get the list of languages that users may need for the user interface. $wanted = Localization::getAvailableInterfaceLanguages(); // Get the list of languages that users may need for the site locales. $siteService...
php
{ "resource": "" }
q23704
UserDeactivatedType.getDefaultSubscription
train
protected function getDefaultSubscription() { if (!$this->defaultSubscription) { $this->defaultSubscription = $this->app->make(StandardSubscription::class,
php
{ "resource": "" }
q23705
UserDeactivatedType.getAvailableFilters
train
public function getAvailableFilters() { if (!$this->defaultFilter) { $this->defaultFilter = $this->app->make(StandardFilter::class, [ $this, self::IDENTIFIER,
php
{ "resource": "" }
q23706
Single.addGlobal
train
public static function addGlobal($cPath, $pkg = null) { $pathToFile = static::getPathToNode($cPath, $pkg); $txt = Loader::helper('text'); $c = CorePage::getByPath($cPath); if ($c->isError() && $c->getError() == COLLECTION_NOT_FOUND) { // create the page at that point in t...
php
{ "resource": "" }
q23707
Single.getList
train
public static function getList() { $db = Loader::db(); $r = $db->query("select Pages.cID from Pages inner join Collections on Pages.cID = Collections.cID where cFilename
php
{ "resource": "" }
q23708
GroupCombinationEntity.getAccessEntitiesForUser
train
public static function getAccessEntitiesForUser($user) { $entities = []; // If the user isnt registered, there is no need to do this anymore. if ($user->isRegistered()) { $ingids = []; $app = Facade::getFacadeApplication(); /** @var $database \Concrete\Cor...
php
{ "resource": "" }
q23709
GroupCombinationEntity.getOrCreate
train
public static function getOrCreate($groups) { $app = Facade::getFacadeApplication(); /** @var $database \Concrete\Core\Database\Connection\Connection */ $database = $app->make('database')->connection(); $petID = $database->fetchColumn( 'select petID from PermissionAccessE...
php
{ "resource": "" }
q23710
GroupCombinationEntity.getAccessEntityUsers
train
public function getAccessEntityUsers(PermissionAccess $pa) { $userList = new UserList(); $userList->ignorePermissions(); foreach ($this->groups as $g) {
php
{ "resource": "" }
q23711
GroupCombinationEntity.load
train
public function load() { $app = Facade::getFacadeApplication(); /** @var $database \Concrete\Core\Database\Connection\Connection */ $database = $app->make('database')->connection(); $gIDs = $database->fetchAll( 'select gID from PermissionAccessEntityGroups whe...
php
{ "resource": "" }
q23712
OutputStyle.askWithCompletion
train
public function askWithCompletion($question, array $choices, $default = null, $attempts = null, $strict = false) { $question = new Question($question, $default); $question->setMaxAttempts($attempts)->setAutocompleterValues($choices); if ($strict) { $question->setValidator(functi...
php
{ "resource": "" }
q23713
OutputStyle.columns
train
public function columns(array $values, $width = 5, $tableStyle = 'compact', array $columnStyles = []) { $table = new Table($this); $table->setHeaders([])->setRows(iterator_to_array($this->chunk($values, $width)))->setStyle($tableStyle); foreach ($columnStyles as $columnIndex => $columnStyle...
php
{ "resource": "" }
q23714
LoginAttemptService.trackAttempt
train
public function trackAttempt($username, $password) { if (!$this->config->get('concrete.user.deactivation.authentication_failure.enabled', false)) { return $this; } $user = $this->resolveUser($username); if (!$user) { return; } $attempt = new ...
php
{ "resource": "" }
q23715
LoginAttemptService.remainingAttempts
train
public function remainingAttempts($username) { $config = $this->config->get('concrete.user.deactivation.authentication_failure'); $allowed = (int) array_get($config, 'amount', 0); $duration = (int) array_get($config, 'duration', 0); $after = Carbon::now('UTC')->subSeconds($duration)...
php
{ "resource": "" }
q23716
LoginAttemptService.deactivate
train
public function deactivate($username) { if (!$this->config->get('concrete.user.deactivation.authentication_failure.enabled', false)) { return; } $user = $this->resolveUser($username); if (!$user) { throw new InvalidArgumentException(t('Unable to find and deac...
php
{ "resource": "" }
q23717
LoginAttemptService.pruneAttempts
train
public function pruneAttempts(DateTime $before = null) { if (!$before) { $duration = (int) $this->config->get('concrete.user.deactivation.authentication_failure.duration'); $before = Carbon::now('UTC')->subSeconds($duration); } // Load our repository and get entries ...
php
{ "resource": "" }
q23718
LoginAttemptService.manageBatch
train
private function manageBatch(array $batch, $max = 0) { if (count($batch) >= $max) { $this->entityManager->flush();
php
{ "resource": "" }
q23719
FileSystemStashDriver.storeData
train
public function storeData($key, $data, $expiration) { $path = $this->makePath($key); // MAX_PATH is 260 - http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx if (strlen($path) > 259 && stripos(PHP_OS, 'WIN') === 0) { throw new WindowsPathMaxLengthException(); }...
php
{ "resource": "" }
q23720
Update.getApplicationUpdateInformation
train
public static function getApplicationUpdateInformation() { $app = Application::getFacadeApplication(); $cache = $app->make('cache'); $r = $cache->getItem('APP_UPDATE_INFO'); if ($r->isMiss()) { $r->lock();
php
{ "resource": "" }
q23721
Update.getLocalAvailableUpdates
train
public function getLocalAvailableUpdates() { $app = Application::getFacadeApplication(); $fh = $app->make('helper/file'); $updates = []; $contents = @$fh->getDirectoryContents(DIR_CORE_UPDATES); foreach ($contents as $con) { if (is_dir(DIR_CORE_UPDATES . '/' . $co...
php
{ "resource": "" }
q23722
Update.isCurrentVersionNewerThanDatabaseVersion
train
public static function isCurrentVersionNewerThanDatabaseVersion() { $app = Application::getFacadeApplication(); $db = $app->make(Connection::class); $config = $app->make('config');
php
{ "resource": "" }
q23723
AbstractPackageProvider.getAnnotationReader
train
protected function getAnnotationReader() { if ($this->packageSupportsLegacyCore()) { $reader = $this->getLegacyAnnotationReader(); } else {
php
{ "resource": "" }
q23724
User.recordLogin
train
public function recordLogin() { $app = Application::getFacadeApplication(); $db = $app['database']->connection(); $uLastLogin = $db->getOne("select uLastLogin from Users where uID = ?", array($this->uID)); /** @var \Concrete\Core\Permission\IPService $iph */ $iph = $app->mak...
php
{ "resource": "" }
q23725
User.setUserDefaultLanguage
train
public function setUserDefaultLanguage($lang) { $app = Application::getFacadeApplication(); $db = $app['database']->connection(); $session = $app['session']; $this->uDefaultLanguage = $lang;
php
{ "resource": "" }
q23726
User.getUserLanguageToDisplay
train
public function getUserLanguageToDisplay() { if ($this->getUserDefaultLanguage() != '') { return $this->getUserDefaultLanguage();
php
{ "resource": "" }
q23727
User.inGroup
train
public function inGroup($g) { $app = Application::getFacadeApplication(); $db = $app['database']->connection(); $v = array($this->uID); $cnt = $db->GetOne("select Groups.gID from UserGroups inner join " .
php
{ "resource": "" }
q23728
User.loadCollectionEdit
train
public function loadCollectionEdit(&$c) { $c->refreshCache(); // can only load one page into edit mode at a time. if ($c->isCheckedOut()) { return false; } $app = Application::getFacadeApplication(); $db = $app['database']->connection(); $cID = ...
php
{ "resource": "" }
q23729
User.persist
train
public function persist($cache_interface = true) { $this->refreshUserGroups(); $app = Application::getFacadeApplication(); /** @var \Symfony\Component\HttpFoundation\Session\Session $session */ $session = $app['session']; $session->set('uID', $this->getUserID()); $s...
php
{ "resource": "" }
q23730
Type.getList
train
public static function getList() { $db = Database::connection(); $handles = $db->GetCol('select cnvRatingTypeHandle from ConversationRatingTypes order by cnvRatingTypeHandle asc'); $types = array(); foreach ($handles as $handle) {
php
{ "resource": "" }
q23731
Newsflow.getEditionByID
train
public function getEditionByID($cID) { if (!$this->hasConnectionError()) { $fileService = new File(); $appVersion = Config::get('concrete.version'); $cfToken = Marketplace::getSiteToken(); $path = Config::get('concrete.urls.newsflow') . '/' . DISPATCHER_FILENA...
php
{ "resource": "" }
q23732
Newsflow.getSlotContents
train
public function getSlotContents() { if ($this->slots === null) { $fileService = new File(); $appVersion = Config::get('concrete.version'); $cfToken = Marketplace::getSiteToken(); $url = Config::get('concrete.urls.newsflow') . Config::get('concrete.urls.paths.n...
php
{ "resource": "" }
q23733
Asset.getAssetContentsByRoute
train
protected static function getAssetContentsByRoute($route) { $result = null; try { $app = Application::getFacadeApplication(); $router = $app->make(RouterInterface::class); $context = new RequestContext(); $context->fromRequest($app->make(Request::class...
php
{ "resource": "" }
q23734
DefaultServer.addMiddleware
train
public function addMiddleware(MiddlewareInterface $middleware, $priority = 10)
php
{ "resource": "" }
q23735
DefaultServer.removeMiddleware
train
public function removeMiddleware(MiddlewareInterface $middleware) {
php
{ "resource": "" }
q23736
DefaultServer.handleRequest
train
public function handleRequest(SymfonyRequest $request) { $stack = $this->stack; if ($stack instanceof MiddlewareStack) {
php
{ "resource": "" }
q23737
UsageTracker.forgetCollection
train
private function forgetCollection(Collection $collection) { $query_builder = $this->manager->createQueryBuilder(); $query_builder
php
{ "resource": "" }
q23738
DefaultValidator.validateAuthorization
train
public function validateAuthorization(ServerRequestInterface $request) { $user = $this->app->make(User::class); // Allow logged in users to bypass API authentication entirely if the route allows it // This functionality is NOT READY. We will not allow this yet. /* $route = $...
php
{ "resource": "" }
q23739
Progress.getWorkflowObject
train
public function getWorkflowObject() { if ($this->wfID > 0) { $wf = Workflow::getByID($this->wfID); } else {
php
{ "resource": "" }
q23740
Progress.getWorkflowRequestObject
train
public function getWorkflowRequestObject() { if ($this->wrID > 0) { $cat = WorkflowProgressCategory::getByID($this->wpCategoryID); $handle = $cat->getWorkflowProgressCategoryHandle(); $class = '\\Core\\Workflow\\Request\\' . Core::make('helper/text')->camelcase($handle) ....
php
{ "resource": "" }
q23741
Progress.create
train
public static function create($wpCategoryHandle, Workflow $wf, WorkflowRequest $wr) { $db = Database::connection(); $wpDateAdded = Core::make('helper/date')->getOverridableNow(); $wpCategoryID = $db->fetchColumn('select wpCategoryID from WorkflowProgressCategories where wpCategoryHandle = ?'...
php
{ "resource": "" }
q23742
Progress.start
train
public function start() { $wf = $this->getWorkflowObject(); if (is_object($wf)) { $r = $wf->start($this);
php
{ "resource": "" }
q23743
Progress.runTask
train
public function runTask($task, $args = array()) { $wf = $this->getWorkflowObject(); if (in_array($task, $wf->getAllowedTasks())) { $wpr = call_user_func_array(array($wf, $task), array($this, $args));
php
{ "resource": "" }
q23744
Form.action
train
public function action($action, $task = null) {
php
{ "resource": "" }
q23745
Form.hidden
train
public function hidden($key, $value = null, $miscFields = []) { $requestValue = $this->getRequestValue($key); if ($requestValue !== false && (!is_array($requestValue))) { $value = $requestValue; }
php
{ "resource": "" }
q23746
Form.checkbox
train
public function checkbox($key, $value, $isChecked = false, $miscFields = []) { if (substr($key, -2) == '[]') { $_field = substr($key, 0, -2); $id = $_field . '_' . $value; } else { $_field = $key; $id = $key; } $checked = false; ...
php
{ "resource": "" }
q23747
Form.textarea
train
public function textarea($key, $valueOrMiscFields = '', $miscFields = []) { if (is_array($valueOrMiscFields)) { $value = ''; $miscFields = $valueOrMiscFields; } else { $value = $valueOrMiscFields; } $requestValue = $this->getRequestValue($key); ...
php
{ "resource": "" }
q23748
Form.radio
train
public function radio($key, $value, $checkedValueOrMiscFields = '', $miscFields = []) { if (is_array($checkedValueOrMiscFields)) { $checkedValue = ''; $miscFields = $checkedValueOrMiscFields; } else { $checkedValue = $checkedValueOrMiscFields; } $c...
php
{ "resource": "" }
q23749
Form.select
train
public function select($key, $optionValues, $valueOrMiscFields = '', $miscFields = []) { if (!is_array($optionValues)) { $optionValues = []; } if (is_array($valueOrMiscFields)) { $selectedValue = ''; $miscFields = $valueOrMiscFields; } else { ...
php
{ "resource": "" }
q23750
Form.selectMultiple
train
public function selectMultiple($key, $optionValues, $defaultValues = false, $miscFields = []) { $requestValue = $this->getRequestValue($key . '[]'); if ($requestValue !== false) { $selectedValues = $requestValue; } else { $selectedValues = $defaultValues; } ...
php
{ "resource": "" }
q23751
Form.parseMiscFields
train
protected function parseMiscFields($defaultClass, $attributes) { $attributes = (array) $attributes; if ($defaultClass) { $attributes['class'] = trim((isset($attributes['class']) ? $attributes['class'] : '') . ' ' . $defaultClass);
php
{ "resource": "" }
q23752
ApplicationUpdate.getByVersionNumber
train
public static function getByVersionNumber($version) { $updates = id(new Update())->getLocalAvailableUpdates(); foreach ($updates as $up) {
php
{ "resource": "" }
q23753
ApplicationUpdate.get
train
public static function get($dir) { $version_file = DIR_CORE_UPDATES . "/{$dir}/" . DIRNAME_CORE . '/config/concrete.php'; $concrete = @include $version_file; if ($concrete['version'] != false) { $obj = new self();
php
{ "resource": "" }
q23754
ApplicationUpdate.getDiagnosticObject
train
public function getDiagnosticObject() { $app = Application::getFacadeApplication(); $client = $app->make('http/client'); $request = $client->getRequest(); $request->setUri(Config::get('concrete.updates.services.inspect_update')); $request->setMethod('POST'); $request-...
php
{ "resource": "" }
q23755
Manager.addGroup
train
public function addGroup($name, $fields = []) { $group = new Group();
php
{ "resource": "" }
q23756
Controller.saveAuthenticationType
train
public function saveAuthenticationType($args) { $passedUrl = trim($args['url']); if ($passedUrl) { try { $url = Url::createFromUrl($passedUrl); if (!(string)$url->getScheme() || !(string)$url->getHost()) { throw new InvalidArgumentExc...
php
{ "resource": "" }
q23757
Controller.edit
train
public function edit() { $config = $this->app->make(Repository::class); $this->set('form', $this->app->make('helper/form')); $this->set('data', $config->get('auth.external_concrete5', []));
php
{ "resource": "" }
q23758
Controller.setData
train
private function setData() { $data = $this->config->get('auth.external_concrete5', ''); $authUrl = $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concrete5/attempt_auth']); $attachUrl = $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concret...
php
{ "resource": "" }
q23759
PasswordChangeEventHandler.handleEvent
train
public function handleEvent(Event $event) { if (!$event instanceof UserInfoWithPassword) { throw new InvalidArgumentException(t('Invalid event type provided. Event type must be "UserInfoWithPassword".')); }
php
{ "resource": "" }
q23760
ApacheDetector.detectFromPHPInfo
train
private function detectFromPHPInfo($value) { $result = null; if (is_string($value) && preg_match('/\bApache\/(\d+(\.\d+)+)/i', $value, $m))
php
{ "resource": "" }
q23761
Router.route
train
public function route($data) { if (is_array($data)) { $path = $data[0]; $pkg = $data[1]; } else { $path = $data; } $path = trim($path, '/'); $pkgHandle = null; if ($pkg) { if (is_object($pkg)) { $pkgHand...
php
{ "resource": "" }
q23762
PageCache.deliver
train
public function deliver(PageCacheRecord $record) { $response = new Response(); $headers = []; if (defined('APP_CHARSET')) { $headers['Content-Type'] = 'text/html;
php
{ "resource": "" }
q23763
PageCache.getLibrary
train
public static function getLibrary() { if (!self::$library) { $app = Application::getFacadeApplication(); $config = $app->make('config'); $adapter = $config->get('concrete.cache.page.adapter'); $class = overrideable_core_class( 'Core\\Cache\\Pag...
php
{ "resource": "" }
q23764
PageCache.shouldCheckCache
train
public function shouldCheckCache(Request $req) { if ($req->getMethod() === $req::METHOD_POST) { return false; } $app = Application::getFacadeApplication();
php
{ "resource": "" }
q23765
PageCache.outputCacheHeaders
train
public function outputCacheHeaders(ConcretePage $c) { foreach ($this->getCacheHeaders($c) as
php
{ "resource": "" }
q23766
PageCache.getCacheHeaders
train
public function getCacheHeaders(ConcretePage $c) { $lifetime = $c->getCollectionFullPageCachingLifetimeValue(); $expires = gmdate('D, d M Y H:i:s', time() + $lifetime) . ' GMT'; $headers = [ 'Pragma' => 'public',
php
{ "resource": "" }
q23767
PageCache.shouldAddToCache
train
public function shouldAddToCache(PageView $v) { $c = $v->getPageObject(); if (!is_object($c)) { return false; } $cp = new Checker($c); if (!$cp->canViewPage()) { return false; } if (is_object($v->controller)) { $allowedCon...
php
{ "resource": "" }
q23768
PageCache.getCacheKey
train
public function getCacheKey($mixed) { if ($mixed instanceof ConcretePage) { $collectionPath = trim((string) $mixed->getCollectionPath(), '/'); if ($collectionPath !== '') { return urlencode($collectionPath); } $cID = $mixed->getCollectionID(); ...
php
{ "resource": "" }
q23769
Stacks.canMoveStacks
train
protected function canMoveStacks($parent) { $page = ($parent instanceof \Concrete\Core\Page\Page) ?
php
{ "resource": "" }
q23770
LoginAttempt.getContext
train
public function getContext() { return [ 'username' => $this->username, 'requestPath' => $this->requestPath, 'errors' => $this->errors,
php
{ "resource": "" }
q23771
PageList.filterByPageTemplate
train
public function filterByPageTemplate(TemplateEntity $template) { $this->query->andWhere('cv.pTemplateID = :pTemplateID');
php
{ "resource": "" }
q23772
PageList.filterByNumberOfChildren
train
public function filterByNumberOfChildren($number, $comparison = '>') { $number = intval($number); if ($this->includeAliases) { $this->query->andWhere( $this->query->expr()->orX( $this->query->expr()->comparison('p.cChildren', $comparison, ':cChildren')...
php
{ "resource": "" }
q23773
PageList.filterByDateLastModified
train
public function filterByDateLastModified($date, $comparison = '=') { $this->que
php
{ "resource": "" }
q23774
PageList.filterByPageTypeID
train
public function filterByPageTypeID($ptID) { $db = \Database::get(); if (is_array($ptID)) { $this->query->andWhere( $this->query->expr()->in('pt.ptID', array_map([$db, 'quote'], $ptID)) ); } else {
php
{ "resource": "" }
q23775
PageList.filterByParentID
train
public function filterByParentID($cParentID) { $db = \Database::get(); if (is_array($cParentID)) { $this->query->andWhere( $this->query->expr()->in('p.cParentID', array_map([$db, 'quote'], $cParentID)) ); } else {
php
{ "resource": "" }
q23776
PageList.filterByName
train
public function filterByName($name, $exact = false) { if ($exact) { $this->query->andWhere('cv.cvName = :cvName'); $this->query->setParameter('cvName', $name); } else { $this->query->andWhere(
php
{ "resource": "" }
q23777
PageList.filterByPath
train
public function filterByPath($path, $includeAllChildren = true) { if (!$includeAllChildren) { $this->query->andWhere('pp.cPath = :cPath'); $this->query->setParameter('cPath', $path); } else { $this->query->andWhere(
php
{ "resource": "" }
q23778
PageList.filterByKeywords
train
public function filterByKeywords($keywords) { $expressions = [ $this->query->expr()->like('psi.cName', ':keywords'), $this->query->expr()->like('psi.cDescription', ':keywords'), $this->query->expr()->like('psi.content', ':keywords'), ]; $keys = \Collectio...
php
{ "resource": "" }
q23779
Factory.getOptions
train
protected function getOptions(Repository $config) { $result = $config->get('app.http_client'); if (!is_array($result)) { $result = []; } $result['proxyhost'] = $config->get('concrete.proxy.host'); $result['proxyport'] = $config->get('concrete.proxy.port');
php
{ "resource": "" }
q23780
Liaison.transformKey
train
protected function transformKey($key) { $key = sprintf('site.sites.%s.%s',
php
{ "resource": "" }
q23781
Device.getViewportHTML
train
public function getViewportHTML() { $added_data = array( 'handle', 'name', 'brand', 'width', 'height', 'ratio', 'agent', ); $datas = array(); foreach ($added_data as $key) {
php
{ "resource": "" }
q23782
PageIndexer.index
train
public function index($page) { if ($page = $this->getPage($page)) { if ($page->getVersionObject()) {
php
{ "resource": "" }
q23783
PageIndexer.forget
train
public function forget($page) { if ($page = $this->getPage($page)) { /** @todo Implement forgetting pages completely */ /** @var Connection
php
{ "resource": "" }
q23784
PageIndexer.getPage
train
protected function getPage($page) { // Handle passed cID if (is_numeric($page)) { return Page::getByID($page); } // Handle passed /path/to/collection if (is_string($page)) { return Page::getByPath($page); } // If it's a page, just ret...
php
{ "resource": "" }
q23785
DashboardExpressEntriesPageController.csv_export
train
public function csv_export($treeNodeParentID = null) { $me = $this; $parent = $me->getParentNode($treeNodeParentID); $entity = $me->getEntity($parent); $permissions = new \Permissions($entity); if (!$permissions->canViewExpressEntries()) { throw new \Exception(t('...
php
{ "resource": "" }
q23786
AbstractExporter.insertObject
train
public function insertObject(ObjectInterface $object) { $this->writer->insertOne(iterator_to
php
{ "resource": "" }
q23787
AbstractExporter.insertList
train
public function insertList(ItemList $list) {
php
{ "resource": "" }
q23788
AbstractExporter.projectHeaders
train
protected function projectHeaders() { foreach ($this->getStaticHeaders() as $header) { yield $header; } foreach ($this->getAttributeKeysAndControllers() as list($attributeKey, $attributeController)) { /* @var \Concrete\Core\Attribute\AttributeKeyInterface $attributeK...
php
{ "resource": "" }
q23789
AbstractExporter.projectObject
train
protected function projectObject(ObjectInterface $object) { foreach ($this->getStaticFieldValues($object) as $value) { yield $value; } foreach ($this->getAttributeKeysAndControllers() as list($attributeKey, $attributeController)) { /* @var \Concrete\Core\Attribute\At...
php
{ "resource": "" }
q23790
AbstractExporter.projectList
train
protected function projectList(ItemList $list) { $sth = $list->deliverQueryObject()->execute(); foreach ($sth as $row) { $listResult = $list->getResult($row);
php
{ "resource": "" }
q23791
AbstractExporter.unloadDoctrineEntities
train
protected function unloadDoctrineEntities() { $this->attributeKeysAndControllers = null; $app = Application::getFacadeApplication(); $entityManager = $app->make(EntityManagerInterface::class); $entityManager->clear(); $category = $this->getCategory(); if ($category !=...
php
{ "resource": "" }
q23792
PostLoginLocation.setSessionPostLoginUrl
train
public function setSessionPostLoginUrl($url) { $normalized = null; if ($url instanceof Page) { if (!$url->isError()) { $cID = (int) $url->getCollectionID(); if ($cID > 0) { $normalized = $cID; } } } e...
php
{ "resource": "" }
q23793
PostLoginLocation.getSessionPostLoginUrl
train
public function getSessionPostLoginUrl($resetSessionPostLoginUrl = false) { $result = ''; $normalized = $this->session->get(static::POSTLOGIN_SESSION_KEY); if ($this->valn->integer($normalized, 1)) { $page = Page::getByID($normalized); if ($page && !$page->isError()) ...
php
{ "resource": "" }
q23794
PostLoginLocation.getDefaultPostLoginUrl
train
public function getDefaultPostLoginUrl() { $result = ''; $loginRedirectMode = (string) $this->config->get('concrete.misc.login_redirect'); switch ($loginRedirectMode) { case 'CUSTOM': $loginRedirectCollectionID = $this->config->get('concrete.misc.login_redirect_ci...
php
{ "resource": "" }
q23795
PostLoginLocation.getPostLoginUrl
train
public function getPostLoginUrl($resetSessionPostLoginUrl = false) { $result = $this->getSessionPostLoginUrl($resetSessionPostLoginUrl); if ($result === '') { $result = $this->getDefaultPostLoginUrl();
php
{ "resource": "" }
q23796
PostLoginLocation.getPostLoginRedirectResponse
train
public function getPostLoginRedirectResponse($resetSessionPostLoginUrl = false) { $result = $this->responseFactory->redirect( $this->getPostLoginUrl($resetSessionPostLoginUrl), Response::HTTP_FOUND ); // Disable caching for response $result = $result->setMaxAg...
php
{ "resource": "" }
q23797
Manager.registerImporterRoutine
train
public function registerImporterRoutine(RoutineInterface $routine) { if (in_array($routine, $this->routines)) {
php
{ "resource": "" }
q23798
Value.validateAttributeValue
train
public function validateAttributeValue() { $at = $this->attributeType; $at->getController()->setAttributeKey($this->attributeKey); $e = true;
php
{ "resource": "" }
q23799
EscapeFormula.filterSpecialCharacters
train
protected function filterSpecialCharacters(array $characters) { foreach ($characters as $str) { if (1 != strlen($str)) { throw
php
{ "resource": "" }