List available document type

@return void
166695
public function showConfiguredTypesCommand()
    {
        $classesAndAnnotations = $this->indexInformer->getClassesAndAnnotations();
        $this->outputFormatted("<b>Available document type</b>");
        /** @var $annotation Indexable */
        foreach ($classesAndAnnotations as $className => $annotation) {
            $this->outputFormatted("%s", [$className], 4);
        }
    }
101425
public function list_files() {
        $this->listresults = array();
        $this->mode = self::MODE_LIST;
        $this->extract_or_list();
        $listresults = $this->listresults;
        $this->listresults = null;
        return $listresults;
    }
895253
public function index() {
		$currentType = $this->request->getQuery('type');

		if (DatabaseLogsTable::isSearchEnabled()) {
			$query = $this->DatabaseLogs->find('search', ['search' => $this->request->getQuery()]);
		} else {
			$conditions = $this->DatabaseLogs->textSearch();
			if ($currentType) {
				$conditions['type'] = $currentType;
			}
			$query = $this->DatabaseLogs->find()->where($conditions);
		}
		$query = $query->select(['id', 'created', 'type', 'summary', 'count']);

		$logs = $this->paginate($query);
		$types = $this->DatabaseLogs->getTypes();

		$this->set(compact('logs', 'types', 'currentType'));
	}
1357613
protected function _listeGetLi()
    {
        $im = $this->_defList[count($this->_defList)-1]['img'];
        $st = $this->_defList[count($this->_defList)-1]['style'];
        $nb = $this->_defList[count($this->_defList)-1]['nb'];
        $up = (substr($st, 0, 6) === 'upper-');

        if ($im) {
            return array(false, false, $im);
        }

        switch ($st) {
            case 'none':
                return array('helvetica', true, ' ');

            case 'upper-alpha':
            case 'lower-alpha':
                $str = '';
                while ($nb>26) {
                    $str = chr(96+$nb%26).$str;
                    $nb = floor($nb/26);
                }
                $str = chr(96+$nb).$str;

                return array('helvetica', false, ($up ? strtoupper($str) : $str).'.');

            case 'upper-roman':
            case 'lower-roman':
                $str = $this->_listeArab2Rom($nb);

                return array('helvetica', false, ($up ? strtoupper($str) : $str).'.');

            case 'decimal':
                return array('helvetica', false, $nb.'.');

            case 'square':
                return array('zapfdingbats', true, chr(110));

            case 'circle':
                return array('zapfdingbats', true, chr(109));

            case 'disc':
            default:
                return array('zapfdingbats', true, chr(108));
        }
    }
1119815
public function getAvailable()
    {
        return [
            self::TEMAPLATE_PAPER_FORM_A4 => 'A4',
            self::TEMAPLATE_PAPER_FORMAT_A3 => 'A3',
            self::TEMAPLATE_PAPER_FORMAT_A5 => 'A5',
            self::TEMAPLATE_PAPER_FORMAT_A6 => 'A6',
            self::TEMAPLATE_PAPER_FORMAT_LETTER => 'Letter',
            self::TEMAPLATE_PAPER_FORMAT_LEGAL => 'Legal',
        ];
    }
229775
public function currentLfmType()
    {
        $lfm_type = 'file';

        $request_type = lcfirst(str_singular($this->input('type') ?: ''));
        $available_types = array_keys($this->config->get('lfm.folder_categories') ?: []);

        if (in_array($request_type, $available_types)) {
            $lfm_type = $request_type;
        }

        return $lfm_type;
    }
1337159
public function getPageTypes($dc)
    {
        $options = [];
        $rootAllowed = true;

        if ($dc->activeRecord->pid > 0) {
            $rootAllowed = false;
            $parentType = $this->db->fetchColumn('SELECT type FROM tl_page WHERE id=?', [$dc->activeRecord->pid]);

            // Allow root in second level if the parent is folder
            if ($parentType === 'folder') {
                $rootAllowed = true;
            }
        }

        foreach (array_keys($GLOBALS['TL_PTY']) as $pty) {
            // Root pages are allowed on the first level only (see #6360)
            if ($pty === 'root' && !$rootAllowed) {
                continue;
            }

            // Allow the currently selected option and anything the user has access to
            if ($pty === $dc->value || $this->user->hasAccess($pty, 'alpty')) {
                $options[] = $pty;
            }
        }

        return $options;
    }
969222
public static function getAvailableTypes()
    {
        return [
            self::TYPE_STRING,
            self::TYPE_INTEGER,
            self::TYPE_FLOAT,
            self::TYPE_BOOLEAN,
            self::TYPE_DATETIME,
        ];
    }
344135
public function listFieldTypesOptions() {
    $field_types_data = $this->loadFieldTypeData();

    $return = [];
    foreach ($field_types_data as $field_type_id => $field_type_info) {
      $return[$field_type_id] = $field_type_info['label'];
    }

    return $return;
  }
600761
public function listAction()
    {
        $page = $this->getRequest()->getQuery('page', 0);
        $limit = $this->getRequest()->getQuery('limit', $this->defaultPageSize);
        $sort = $this->getRequest()->getQuery('sort', $this->defaultSort);
        $order = $this->getRequest()->getQuery('order', $this->defaultOrder);

        if (empty($sort)) {
            $sort = $this->defaultSort;
        }

        $offset = $limit * $page - $limit;
        if ($offset < 0) {
            $offset = 0;
        }

        /* @var $qb \Doctrine\ODM\MongoDB\Query\Builder */
        $qb = $this->getDocumentManager()->createQueryBuilder($this->getDocumentClass());
        $qb->select()
        ->sort($sort, $order)
        ->limit($limit)
        ->skip($offset);

        $this->handleSearch($qb);

        $paginator = new Paginator(new DoctrinePaginator($qb->getQuery()->execute()));
        $paginator->setDefaultItemCountPerPage($limit);
        $paginator->setCurrentPageNumber($page);
        $paginator->setPageRange($this->paginatorRange);

        return [
            'paginator' => $paginator,
            'sort' => $sort,
            'order' => $order,
            'page' => $page,
            'query' => $this->params()->fromQuery(),
        ];
    }
506953
def is_return_doc_available(self):
        """"""
        return bool(self.return_doc and (self.return_doc.get('text') or self.return_doc.get('type')))
253637
public static function getUsedTypeList()
    {
        $app = Application::getFacadeApplication();
        $db = $app->make('database')->connection();
        $stm = $db->query('select distinct fvType from FileVersions where fvIsApproved = 1 and fvType is not null and fvType <> 0');
        $types = [];
        while ($row = $stm->fetch()) {
            $types[] = (int) $row['fvType'];
        }

        return $types;
    }
220028
public function PageTypes()
    {
        $classes = SiteTree::page_type_classes();

        $result = new ArrayList();

        foreach ($classes as $class) {
            $instance = SiteTree::singleton($class);
            if ($instance instanceof HiddenClass) {
                continue;
            }

            // skip this type if it is restricted
            $needPermissions = $instance->config()->get('need_permission');
            if ($needPermissions && !$this->can($needPermissions)) {
                continue;
            }

            $result->push(new ArrayData(array(
                'ClassName' => $class,
                'AddAction' => $instance->i18n_singular_name(),
                'Description' => $instance->i18n_classDescription(),
                'IconURL' => $instance->getPageIconURL(),
                'Title' => $instance->i18n_singular_name(),
            )));
        }

        $result = $result->sort('AddAction');

        return $result;
    }
1082396
public function AvailableSectionTypes()
    {
        $AvailableTypes = ClassInfo::subclassesfor('Section');
        unset($AvailableTypes['Section']);

        # Get section options from each page type.
        $pageTypeOptions = Config::inst()->get($this->owner->ClassName, 'section_options');

        foreach ($AvailableTypes as $key => $value) {
            $Config = Config::inst();
            $selectable_option = true;
            if ($Config->get($value, 'selectable_option') !== null) {
                $selectable_option = $Config->get($value, 'selectable_option');
            }
            $AvailableTypes[$key] = array(
                'classname' => $value,
                'type' => Section::Type($value),
                'presets' => $Config->get($value, 'presets'),
                'selectable_option' => $selectable_option,
                'limit' => $Config->get($value, 'limit'),
            );

            if (isset($pageTypeOptions[$key])) {
                $AvailableTypes[$key] = array_merge($AvailableTypes[$key], $pageTypeOptions[$key]);
            }

            $AvailableTypes[$key]['limit_reached'] = false;
            if(isset($AvailableTypes[$key]['limit'])){
                if ($AvailableTypes[$key]['limit'] == 0) {
                    $AvailableTypes[$key]['limit_reached'] = true;
                }

                $CurrentSectionCount = $this->owner
                    ->Sections()
                    ->filter('ClassName', $AvailableTypes[$key]['type'])
                    ->count();
                if ($CurrentSectionCount >= $AvailableTypes[$key]['limit']) {
                    $AvailableTypes[$key]['limit_reached'] = true;
                }
            }
        }

        return $AvailableTypes;
    }
176261
public function index() {
		$this->Cliente->recursive = 0;
                
                $descuentoMaximo = Configure::read('Mozo.descuento_maximo');
                $currentRole = $this->Session->read('Auth.User.role');
                
                $this->Prg->commonProcess();
                $this->Paginator->settings['conditions'] = $this->Article->parseCriteria($this->Prg->parsedParams());
        
                $condiciones = array();
                
                if ( strtolower($currentRole) == 'mozo' && is_numeric( $descuentoMaximo ) ) {                
                    $condiciones['OR'] = array(
                            "Descuento.porcentaje <= $descuentoMaximo",
                            'Descuento.porcentaje IS NULL'
                        );
                }
                $this->paginate->settings['conditions'] = $condiciones;
                
                $this->set('tipo_documentos', $this->Cliente->TipoDocumento->find('list'));
		$this->set('clientes', $this->Paginator->paginate());
	}
1367431
protected function getContentEntityTypes() {
    $ids = [
      'block_content',
      'media',
      'node',
      'paragraph',
      'taxonomy_term',
    ];
    $entity_types = [];
    foreach ($ids as $id) {
      try {
        $entity_types[] = $this->entityTypeManager()->getDefinition($id);
      }
      catch (PluginNotFoundException $e) {
        // A PluginNotFoundException here just means that the module providing
        // the entity type in question isn't installed. Continue.
      }
    }
    return $entity_types;
  }
351077
public function listTypesCommand()
    {
        $this->outputLine('The following configuration types are registered:');
        $this->outputLine();

        foreach ($this->configurationManager->getAvailableConfigurationTypes() as $type) {
            $this->outputFormatted('- %s', [$type]);
        }
    }