_id
stringlengths
2
7
title
stringlengths
3
151
partition
stringclasses
3 values
text
stringlengths
33
8k
language
stringclasses
1 value
meta_information
dict
q23900
Manager.apply
train
public function apply($characterSet, $collation, $connectionName = '', $environment = '', callable $messageCallback = null, ErrorList $warnings = null) { if ($messageCallback === null) { $messageCallback = function ($message) { }; } if ((string) $connectionName === '') { ...
php
{ "resource": "" }
q23901
EventService.generateDefaultOccurrences
train
public function generateDefaultOccurrences(CalendarEventVersion $version) { $repetitions = $version->getRepetitionEntityCollection(); $query = $this->entityManager->createQuery('delete from calendar:CalendarEventVersionOccurrence o where o.version = :version'); $query->setParameter('version'...
php
{ "resource": "" }
q23902
EventService.requireOccurrenceRegeneration
train
public function requireOccurrenceRegeneration($repetitions1, $repetitions2) { if (count($repetitions1) != count($repetitions2)) { return true; } $comparator = new
php
{ "resource": "" }
q23903
Cache.loadConfig
train
protected function loadConfig($level) { $app = Application::getFacadeApplication(); $drivers = []; $driverConfigs = $app['config']->get("concrete.cache.levels.{$level}.drivers", []); $preferredDriverName = $app['config']->get("concrete.cache.levels.{$level}.preferred_driver", null); ...
php
{ "resource": "" }
q23904
Cache.buildDriver
train
private function buildDriver(array $driverConfig) { $class = array_get($driverConfig, 'class', ''); if ($class && class_exists($class)) { $implements = class_implements($class); // Make sure that the provided class implements the DriverInterface if (isset($implem...
php
{ "resource": "" }
q23905
Cache.exists
train
public function exists($key) { if ($this->enabled) { return !$this->pool->getItem($key)->isMiss();
php
{ "resource": "" }
q23906
Cache.enable
train
public function enable() { if ($this->driver !== null) {
php
{ "resource": "" }
q23907
Cache.disable
train
public function disable() { // save the current driver if not yet black hole so it can be restored on enable() if (!($this->pool->getDriver() instanceof
php
{ "resource": "" }
q23908
Cache.disableAll
train
public static function disableAll() { $app = Application::getFacadeApplication();
php
{ "resource": "" }
q23909
Cache.enableAll
train
public static function enableAll() { $app = Application::getFacadeApplication();
php
{ "resource": "" }
q23910
IdTokenResponse.getExtraParams
train
protected function getExtraParams(AccessTokenEntityInterface $accessToken) { $params = parent::getExtraParams($accessToken); // If this is an OIDC request, pack a new id token into it if ($this->isOidcRequest($accessToken->getScopes())) { $user = $this->userInfoRepository->getBy...
php
{ "resource": "" }
q23911
IdTokenResponse.createIdToken
train
protected function createIdToken(AccessTokenEntityInterface $accessToken, ClaimsSet $claims) { $issuer = $this->site->getSite(); // Initialize the builder $builder = (new Builder()) ->setAudience($accessToken->getClient()->getIdentifier()) ->setIssuer($issuer->getSit...
php
{ "resource": "" }
q23912
JsonErrorHandler.clientSupportsJson
train
private function clientSupportsJson($minWeight = null) { try { $app = Application::getFacadeApplication(); $rmrp = $app->make(RequestMediaTypeParser::class); return $rmrp->isMediaTypeSupported('application/json', $minWeight);
php
{ "resource": "" }
q23913
Importer.getErrorMessage
train
public static function getErrorMessage($code) { $app = Application::getFacadeApplication(); $defaultStorage = $app->make(StorageLocationFactory::class)->fetchDefault()->getName(); $msg = ''; switch ($code) { case self::E_PHP_NO_FILE: case self::E_FILE_INVALID:...
php
{ "resource": "" }
q23914
Importer.import
train
public function import($pointer, $filename = false, $fr = false, $prefix = null) { $fh = $this->app->make('helper/validation/file'); $fi = $this->app->make('helper/file'); $cf = $this->app->make('helper/concrete/file'); $filename = (string) $filename; if ($filename === '') {...
php
{ "resource": "" }
q23915
Importer.importIncomingFile
train
public function importIncomingFile($filename, $fr = false) { $fh = $this->app->make('helper/validation/file'); if (!$fh->extension($filename)) { return self::E_FILE_INVALID_EXTENSION; } $incoming = $this->app->make(Incoming::class); $incomingStorageLocation = $inc...
php
{ "resource": "" }
q23916
Importer.importUploadedFile
train
public function importUploadedFile(UploadedFile $uploadedFile = null, $fr = false) { if ($uploadedFile === null) { $result = self::E_PHP_NO_FILE; } elseif (!$uploadedFile->isValid()) { $result = $uploadedFile->getError(); } else {
php
{ "resource": "" }
q23917
ThumbnailFormatService.getConfiguredFormat
train
protected function getConfiguredFormat() { $format = $this->config->get('concrete.misc.default_thumbnail_format'); if ($format === static::FORMAT_AUTO || $this->bitmapFormat->isFormatValid($format)) { $result = $format; } elseif ($format === 'jpg') { // legacy value
php
{ "resource": "" }
q23918
TypeList.define
train
public function define($extension, $name, $type, $customImporter = '', $inlineFileViewer = '', $editor = '', $pkgHandle = '') { $ext = explode(',', $extension); foreach ($ext as $e) { $this->types[strtolower($e)] = (new FileType())
php
{ "resource": "" }
q23919
TypeList.defineMultiple
train
public function defineMultiple(array $types) { foreach ($types as $type_name => $type_settings) { array_splice($type_settings, 1, 0, $type_name);
php
{ "resource": "" }
q23920
TypeList.getType
train
public static function getType($ext) { $ftl = static::getInstance(); if (strpos($ext, '.') !== false) { // filename $app = Application::getFacadeApplication(); $h = $app->make('helper/file'); $ext = $h->getExtension($ext);
php
{ "resource": "" }
q23921
AbstractController.getHelperObjects
train
public function getHelperObjects() { $helpers = []; foreach ($this->helpers as $handle) { $h = Core::make('helper/' . $handle);
php
{ "resource": "" }
q23922
MiddlewareStack.getStack
train
private function getStack() { $processed = []; foreach ($this->middlewareGenerator() as $middleware) { $processed[]
php
{ "resource": "" }
q23923
MiddlewareStack.getZipper
train
private function getZipper() { $app = $this->app; return function($last, MiddlewareInterface $middleware)
php
{ "resource": "" }
q23924
MiddlewareStack.middlewareGenerator
train
private function middlewareGenerator() { $middlewares = $this->middleware; ksort($middlewares); foreach ($middlewares as $priorityGroup) {
php
{ "resource": "" }
q23925
Localization.setActiveContext
train
public function setActiveContext($context) { $oldLocale = isset($this->activeContext) ? $this->contextLocales[$this->activeContext] : null; $this->activeContext = $context; if (!isset($this->contextLocales[$context])) { $this->setContextLocale($context, static::BASE_LOCALE); ...
php
{ "resource": "" }
q23926
Localization.pushActiveContext
train
public function pushActiveContext($newContext) { if ($this->activeContext !== null)
php
{ "resource": "" }
q23927
Localization.popActiveContext
train
public function popActiveContext() { if (!empty($this->activeContextQueue)) {
php
{ "resource": "" }
q23928
Localization.withContext
train
public function withContext($context, callable $callback) { $this->pushActiveContext($context); try { return $callback(); } finally { try {
php
{ "resource": "" }
q23929
Localization.getTranslatorAdapter
train
public function getTranslatorAdapter($context) { if (!isset($this->contextLocales[$context])) { // Note: Do NOT call the t() function here as it might possibly // cause an infinte loop in case this happens with the active // context. throw new Exception(sprint...
php
{ "resource": "" }
q23930
Localization.setContextLocale
train
public function setContextLocale($context, $locale) { if (isset($this->contextLocales[$context]) && $this->contextLocales[$context] == $locale) { return; } $this->contextLocales[$context] = $locale;
php
{ "resource": "" }
q23931
Localization.getContextLocale
train
public function getContextLocale($context) { return isset($this->contextLocales[$context]) ?
php
{ "resource": "" }
q23932
Localization.removeLoadedTranslatorAdapters
train
public function removeLoadedTranslatorAdapters() { foreach ($this->contextLocales as
php
{ "resource": "" }
q23933
Localization.getActiveTranslateObject
train
public function getActiveTranslateObject() { $adapter = $this->getTranslatorAdapter($this->getActiveContext()); if (is_object($adapter)) {
php
{ "resource": "" }
q23934
Localization.getAvailableInterfaceLanguages
train
public static function getAvailableInterfaceLanguages() { $languages = []; $fh = Core::make('helper/file'); if (file_exists(DIR_LANGUAGES)) { $contents = $fh->getDirectoryContents(DIR_LANGUAGES); foreach ($contents as $con) { if (is_dir(DIR_LANGUAGES ...
php
{ "resource": "" }
q23935
Localization.clearCache
train
public static function clearCache() { // cache/expensive should be used by the translator adapters. $app = Facade::getFacadeApplication(); $app->make('cache/expensive')->getItem('zend')->clear();
php
{ "resource": "" }
q23936
Localization.currentLocaleChanged
train
protected function currentLocaleChanged($locale) { PunicData::setDefaultLocale($locale); $app = Facade::getFacadeApplication(); if ($app->bound('director')) { $event = new \Symfony\Component\EventDispatcher\GenericEvent();
php
{ "resource": "" }
q23937
SessionFactory.createSession
train
public function createSession() { $config = $this->app['config']['concrete.session']; $storage = $this->getSessionStorage($config); // We have to use "build" here because we have bound this classname to this factory method $session = $this->app->build(SymfonySession::class, [$storag...
php
{ "resource": "" }
q23938
SessionFactory.getDatabaseHandler
train
protected function getDatabaseHandler(array $config) { return $this->app->make(PdoSessionHandler::class, [ $this->app->make(Connection::class)->getWrappedConnection(), [
php
{ "resource": "" }
q23939
SessionFactory.getMemcachedHandler
train
protected function getMemcachedHandler(array $config) { // Create new memcached instance $memcached = $this->app->make(Memcached::class, [ 'CCM_SESSION', null, ]); $servers = array_get($config, 'servers', []); // Add missing servers foreach (...
php
{ "resource": "" }
q23940
SessionFactory.getSessionStorage
train
private function getSessionStorage(array $config) { $app = $this->app; // If we're running through command line, just early return an in-memory storage if ($app->isRunThroughCommandLineInterface()) { return $app->make(MockArraySessionStorage::class); } // Resolv...
php
{ "resource": "" }
q23941
SessionFactory.getSessionHandler
train
private function getSessionHandler(array $config) { $handler = array_get($config, 'handler', 'default'); // Build handler using a matching method "get{Type}Handler" $method = Str::camel("get_{$handler}_handler"); if (method_exists($this, $method)) { return $this->{$metho...
php
{ "resource": "" }
q23942
SessionFactory.newMemcachedServers
train
private function newMemcachedServers(Memcached $memcached, array $servers) { $serverIndex = []; $existingServers = $memcached->getServerList(); foreach ($existingServers as $server) { $serverIndex[$server['host'] . ':' . $server['port']] = true; } foreach ($serv...
php
{ "resource": "" }
q23943
SessionFactory.getRedisHandler
train
protected function getRedisHandler(array $config) { $options = array_get($config, 'redis', []); // In case anyone puts the servers under redis configuration - similar to how we handle cache $servers = array_get($options, 'servers', []); if (empty($servers)) { $servers = a...
php
{ "resource": "" }
q23944
SessionFactory.getRedisInstance
train
private function getRedisInstance(array $servers) { if (count($servers) == 1) { // If we only have one server in our array then we just reconnect to it $server = $servers[0]; $redis = $this->app->make(Redis::class); if (isset($server['socket']) && $server['so...
php
{ "resource": "" }
q23945
SessionFactory.getRedisServers
train
private function getRedisServers(array $servers) { if (!empty($servers)) { foreach ($servers as $server) { if (isset($server['socket'])) { $server = [ 'server' => array_get($server, 'socket', ''), 'ttl' => array_...
php
{ "resource": "" }
q23946
Application.serializeUploadFileExtensions
train
public function serializeUploadFileExtensions($types) { $serialized = ''; $types = preg_replace('{[^a-z0-9]}i', '', $types); foreach ($types as $type) { $serialized .= '*.'.$type.';'; } //removing
php
{ "resource": "" }
q23947
Application.unSerializeUploadFileExtensions
train
public function unSerializeUploadFileExtensions($types) { //split by semi-colon $types = preg_split('{;}', $types, null, PREG_SPLIT_NO_EMPTY);
php
{ "resource": "" }
q23948
Token.getErrorMessage
train
public function getErrorMessage() { $app = Application::getFacadeApplication(); $request = $app->make(Request::class); $ajax = $app->make(Ajax::class);
php
{ "resource": "" }
q23949
Token.output
train
public function output($action = '', $return = false) { $hash = $this->generate($action); $token = '<input type="hidden" name="' . static::DEFAULT_TOKEN_NAME . '" value="' . $hash . '" />';
php
{ "resource": "" }
q23950
Token.validate
train
public function validate($action = '', $token = null) { $app = Application::getFacadeApplication(); if ($token == null) { $request = $app->make(Request::class); $token = $request->request->get(static::DEFAULT_TOKEN_NAME); if ($token === null) { $to...
php
{ "resource": "" }
q23951
FlvInspector.parseDouble
train
private function parseDouble($data) { if (!isset($data[7])) { throw new UnexpectedValueException(); }
php
{ "resource": "" }
q23952
Dashboard.canRead
train
public function canRead() { $c = Page::getByPath('/dashboard', 'ACTIVE'); if ($c && !$c->isError()) {
php
{ "resource": "" }
q23953
SitemapGenerator.getSiteCanonicalUrl
train
public function getSiteCanonicalUrl() { $site = $this->getPageListGenerator()->getSite(); if ($site === null) { $result = ''; } else {
php
{ "resource": "" }
q23954
SitemapGenerator.withCustomCanonicalUrl
train
protected function withCustomCanonicalUrl(callable $run) { $customCanonicalUrl = $this->getCustomSiteCanonicalUrl(); if ($customCanonicalUrl !== '') { $siteConfig = $this->getPageListGenerator()->getSite()->getConfigRepository(); $originalSiteCanonicalUrl = $siteConfig->get('...
php
{ "resource": "" }
q23955
FileManager.file
train
public function file($inputID, $inputName, $chooseText, $preselectedFile = null, $args = []) { $app = Application::getFacadeApplication(); $view = View::getInstance(); $request = $app->make(Request::class); $vh = $app->make('helper/validation/numbers'); $view->requireAsset(...
php
{ "resource": "" }
q23956
FileManager.image
train
public function image($inputID, $inputName, $chooseText, $preselectedFile = null, $args =
php
{ "resource": "" }
q23957
FileManager.video
train
public function video($inputID, $inputName, $chooseText, $preselectedFile = null, $args =
php
{ "resource": "" }
q23958
FileManager.text
train
public function text($inputID, $inputName, $chooseText, $preselectedFile = null, $args =
php
{ "resource": "" }
q23959
FileManager.audio
train
public function audio($inputID, $inputName, $chooseText, $preselectedFile = null, $args =
php
{ "resource": "" }
q23960
FileManager.doc
train
public function doc($inputID, $inputName, $chooseText, $preselectedFile = null, $args = [])
php
{ "resource": "" }
q23961
FileManager.app
train
public function app($inputID, $inputName, $chooseText, $preselectedFile = null, $args = [])
php
{ "resource": "" }
q23962
FileManager.fileOfType
train
private function fileOfType($type, $inputID, $inputName, $chooseText, $preselectedFile = null, $args = []) { if (!is_array($args)) { $args = []; } if (!isset($args['filters']) || !is_array($args['filters'])) { $args['filters'] = []; } $args['filters'] ...
php
{ "resource": "" }
q23963
Tree.getNodeByDisplayPath
train
public function getNodeByDisplayPath($path) { $root = $this->getRootTreeNodeObject(); if ($path == '/' || !$path) { return $root; } $computedPath = ''; $tree = $this; $walk = function ($node, $computedPath) use (&$walk, &$tree, &$path) { $nod...
php
{ "resource": "" }
q23964
Tree.exportTranslations
train
public static function exportTranslations() { $translations = new Translations(); $loc = Localization::getInstance(); $loc->pushActiveContext(Localization::CONTEXT_SYSTEM); try { $app = Application::getFacadeApplication(); $db = $app->make('database')->connect...
php
{ "resource": "" }
q23965
File.getDirectoryContents
train
public function getDirectoryContents($dir, $ignoreFiles = [], $recursive = false) { $aDir = []; if (is_dir($dir)) { $handle = opendir($dir); while (($file = readdir($handle)) !== false) { if (substr($file, 0, 1) != '.' && (!in_array($file, $ignoreFiles))) { ...
php
{ "resource": "" }
q23966
File.unfilename
train
public function unfilename($filename) { $parts = $this->splitFilename($filename); $txt = Core::make('helper/text');
php
{ "resource": "" }
q23967
File.copyAll
train
public function copyAll($source, $target, $mode = null) { if (is_dir($source)) { if ($mode == null) { @mkdir($target, Config::get('concrete.filesystem.permissions.directory')); @chmod($target, Config::get('concrete.filesystem.permissions.directory')); ...
php
{ "resource": "" }
q23968
File.removeAll
train
public function removeAll($source, $inc = false) { if (!is_dir($source)) { return false; } $iterator = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator($source, \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::CHILD_FIRST ...
php
{ "resource": "" }
q23969
File.forceDownload
train
public function forceDownload($file) { session_write_close(); ob_clean(); header('Content-type: application/octet-stream'); $filename = basename($file); header("Content-Disposition: attachment; filename=\"$filename\""); header('Content-Length: ' . filesize($file)); ...
php
{ "resource": "" }
q23970
File.getTemporaryDirectory
train
public function getTemporaryDirectory() { $temp = Config::get('concrete.filesystem.temp_directory'); if ($temp && @is_dir($temp)) { return $temp; } if (!is_dir(DIR_FILES_UPLOADED_STANDARD . '/tmp')) { @mkdir(DIR_FILES_UPLOADED_STANDARD . '/tmp', Config::get('...
php
{ "resource": "" }
q23971
File.sanitize
train
public function sanitize($file) { // Let's build an ASCII-only version of name, to avoid filesystem-specific encoding issues. $asciiName = Core::make('helper/text')->asciify($file); // Let's keep only letters, numbers, underscore and dots. $asciiName = trim(preg_replace(["/[\\s]/", "...
php
{ "resource": "" }
q23972
File.replaceExtension
train
public function replaceExtension($filename, $extension) { $parts = $this->splitFilename($filename); $newFilename = $parts[0] . $parts[1]; if (is_string($extension) && ($extension !== ''))
php
{ "resource": "" }
q23973
File.isSamePath
train
public function isSamePath($path1, $path2) { $path1 = str_replace(DIRECTORY_SEPARATOR, '/', $path1); $path2 = str_replace(DIRECTORY_SEPARATOR, '/', $path2); // Check if OS is case insensitive $checkFile = strtoupper(__FILE__); if ($checkFile === __FILE__) { $check...
php
{ "resource": "" }
q23974
File.makeExecutable
train
public function makeExecutable($file, $who = 'all') { if (!is_file($file)) { throw new Exception(t('File %s could not be found.', $file)); } $perms = @fileperms($file); if ($perms === false) { throw new Exception(t('Unable to retrieve the permissions of the fi...
php
{ "resource": "" }
q23975
UserCategory.saveFromRequest
train
protected function saveFromRequest(Key $key, Request $request) { $key->setAttributeKeyDisplayedOnProfile((string) $request->request->get('uakProfileDisplay') == 1); $key->setAttributeKeyEditableOnProfile((string) $request->request->get('uakProfileEdit') == 1); $key->setAttributeKeyRequiredOn...
php
{ "resource": "" }
q23976
QueueService.get
train
public function get($name, array $additionalConfig = []) { $adapter = new DatabaseQueueAdapter([ 'connection' => $this->connection, ]); $config = array_merge( [
php
{ "resource": "" }
q23977
PageChanges.getWriter
train
private function getWriter() { return $this->app->make( PageActivityExporter::class, [ 'writer'
php
{ "resource": "" }
q23978
PageChanges.getVersionList
train
private function getVersionList() { /* @var \Concrete\Core\Form\Service\Widget\DateTime $dt */ $dt = $this->app->make('helper/form/date_time'); $startDate = $dt->translate('startDate', null, true); $endDate = $dt->translate('endDate', null, true); $versionList = new GlobalV...
php
{ "resource": "" }
q23979
NavItem.isActive
train
public function isActive(&$c) { if ($c) { $cID = ($c->getCollectionPointerID() > 0) ? $c->getCollectionPointerOriginalID()
php
{ "resource": "" }
q23980
NavItem.getTarget
train
public function getTarget() { if ($this->cPointerExternalLink != '') { if ($this->cPointerExternalLinkNewWindow) { return '_blank'; } }
php
{ "resource": "" }
q23981
NavItem.getURL
train
public function getURL() { if ($this->cPointerExternalLink != '') { $link = $this->cPointerExternalLink; } elseif ($this->cPath) { $link = $this->cPath; } elseif ($this->cID == Page::getHomePageID()) { $link =
php
{ "resource": "" }
q23982
Resolver.getPath
train
public function getPath(Version $file_version, ThumbnailVersion $thumbnail) { /** @var File $file */ $file = $file_version->getFile(); $format = $this->formatService->getFormatForFile($file_version); $file_id = $file->getFileID(); $storage_location = $file->getFileStorageLoca...
php
{ "resource": "" }
q23983
Resolver.getStoredThumbnailPath
train
protected function getStoredThumbnailPath($file_id, $version_id, $storage_location_id, $thumbnail_handle, $format) { $builder = $this->connection->createQueryBuilder(); $query = $builder ->select('path')->from('FileImageThumbnailPaths', 'p') ->where('p.fileID = :file') ...
php
{ "resource": "" }
q23984
Resolver.storeThumbnailPath
train
protected function storeThumbnailPath($path, $file_id, $version_id, $storage_location_id, $thumbnail_handle, $format, $isBuilt = true) { try { $this->connection->insert('FileImageThumbnailPaths', array( 'path' => $path, 'fileID' => $file_id, 'fileV...
php
{ "resource": "" }
q23985
Resolver.determineThumbnailPath
train
protected function determineThumbnailPath(Version $file_version, ThumbnailVersion $thumbnail, StorageLocation $storage, ConfigurationInterface $configuration, $format) { if ($thumbnail->shouldExistFor($file_version->getAttribute('width'), $file_version->getAttribute('height'), $file_version->getFile())) { ...
php
{ "resource": "" }
q23986
Resolver.getBuiltThumbnailPath
train
protected function getBuiltThumbnailPath($path, Version $file_version, ThumbnailVersion
php
{ "resource": "" }
q23987
Resolver.getPathFromConfiguration
train
protected function getPathFromConfiguration($path, ConfigurationInterface $configuration) { if ($configuration->hasRelativePath()) { return $configuration->getRelativePathToFile($path);
php
{ "resource": "" }
q23988
Type.canPublishPageTypeBeneathPage
train
public function canPublishPageTypeBeneathPage(\Concrete\Core\Page\Page $page) { $target = $this->getPageTypePublishTargetObject(); if (is_object($target)) {
php
{ "resource": "" }
q23989
GlobalArea.deleteByName
train
public static function deleteByName($arHandle) { $db = Loader::db(); $db->Execute('select cID from Areas where arHandle = ? and arIsGlobal = 1', [$arHandle]);
php
{ "resource": "" }
q23990
GlobalArea.deleteEmptyAreas
train
public static function deleteEmptyAreas() { $app = Application::getFacadeApplication(); $siteService = $app->make(SiteService::class); $multilingualSectionIDs = []; $sites = $siteService->getList(); foreach ($sites as $site) { $multilingualSectionIDs = array_merge...
php
{ "resource": "" }
q23991
EnvironmentDetector.detectConsoleEnvironment
train
protected function detectConsoleEnvironment($environments, array $args) { // First we will check if an environment argument was passed via console arguments // and if it was that automatically overrides
php
{ "resource": "" }
q23992
FileList.filterByStorageLocation
train
public function filterByStorageLocation($storageLocation) { if ($storageLocation instanceof \Concrete\Core\Entity\File\StorageLocation\StorageLocation) { $this->filterByStorageLocationID($storageLocation->getID()); } elseif (!is_object($storageLocation)) {
php
{ "resource": "" }
q23993
FileList.filterByStorageLocationID
train
public function filterByStorageLocationID($fslID) { $fslID = (int) $fslID;
php
{ "resource": "" }
q23994
FileList.filterByTags
train
public function filterByTags($tags) { $this->query->andWhere( $this->query->expr()->andX( $this->query->expr()->like('fv.fvTags', ':tags')
php
{ "resource": "" }
q23995
PreconditionService.getPreconditions
train
public function getPreconditions($includeWebPreconditions = true) { $result = []; foreach ($this->getAllPreconditions() as $instance) { if (!$instance instanceof OptionsPreconditionInterface) {
php
{ "resource": "" }
q23996
PreconditionService.getOptionsPreconditions
train
public function getOptionsPreconditions() { $result = []; foreach ($this->getAllPreconditions() as $instance) { if ($instance instanceof OptionsPreconditionInterface)
php
{ "resource": "" }
q23997
PreconditionService.getPreconditionByHandle
train
public function getPreconditionByHandle($handle) { $list = $this->config->get('install.preconditions'); if (!isset($list[$handle])) { throw new Exception(sprintf('Unable to find an install precondition with handle %s', $handle)); } if (!$list[$handle]) {
php
{ "resource": "" }
q23998
PreconditionService.getPreconditionByClassName
train
public function getPreconditionByClassName($className) { if (!class_exists($className, true)) { throw new Exception(sprintf('The precondition class %s does not exist', $className)); } $result = $this->app->make($className); if (!$result instanceof PreconditionInterface) {...
php
{ "resource": "" }
q23999
PreconditionService.getAllPreconditions
train
private function getAllPreconditions() { $result = []; $list = $this->config->get('install.preconditions'); foreach ($list as $className) { if ($className) {
php
{ "resource": "" }