Retrieve all column names of type int for the current selected table.

@param GetPropertyOptionsEvent $event The event.

@return void
773314
public function getIntColumnNames(GetPropertyOptionsEvent $event)
    {
        if (!$this->isBackendOptionRequestFor($event, ['tag_id'])) {
            return;
        }

        $result = $this->getColumnNamesFromTable(
            $event->getModel()->getProperty('tag_table'),
            [Type::INTEGER, Type::BIGINT, Type::SMALLINT]
        );

        $event->setOptions($result);
    }
80117
public function getColumns($table)
    {
        $query = $this->getUtilityQuery()->showColumns($table);

        $results = $this->query($query, $this->getBinds());
        
        $columns = [];
        foreach ($results as $column) {
            $key = null;
            if ($column['pk'] == 1) {
                $key = 'PRI';
            }
            
            $columns[] = [
                'Field'     => $column['name'],
                'Type'      => $column['type'],
                'Default'   => $column['dflt_value'],
                'Null'      => $column['notnull'] != 1,
                'Key'       => $key
            ];
        }
        
        return $columns;
    }
1126655
public function onGetDatabaseResources(GetDatabaseResourcesEvent $event)
    {
        // prevent errors on command such as cache:clear if doctrine schema has not been updated yet
        if (StorageInterface::STORAGE_ORM == $this->storageType && !$this->storage->translationsTablesExist()) {
            $resources = array();
        } else {
            $resources = $this->storage->getTransUnitDomainsByLocale();
        }

        $event->setResources($resources);
    }
1136264
public function handle(GetPropertyOptionsEvent $event)
    {
        $isAllowed = $this->isAllowedContext(
            $event->getEnvironment()->getDataDefinition(),
            $event->getPropertyName(),
            $event->getModel()
        );

        if (!$isAllowed) {
            return;
        }

        $result = [];
        $model  = $event->getModel();

        $metaModel   = $this->getMetaModel($model);
        $typeFactory = $this->filterSettingFactory->getTypeFactory($model->getProperty('type'));

        $typeFilter = null;
        if ($typeFactory) {
            $typeFilter = $typeFactory->getKnownAttributeTypes();
        }

        foreach ($metaModel->getAttributes() as $attribute) {
            $typeName = $attribute->get('type');

            if ($typeFilter && (!\in_array($typeName, $typeFilter, true))) {
                continue;
            }

            $strSelectVal          = $metaModel->getTableName().'_'.$attribute->getColName();
            $result[$strSelectVal] = $attribute->getName().' ['.$typeName.']';
        }

        $event->setOptions($result);
    }
905996
public function getOptions(GetOptionsEvent $event)
    {
        if (self::isEventForMe($event)) {
            return;
        }

        $model       = $event->getModel();
        $metaModelId = $model->getProperty('pid');
        if (!$metaModelId) {
            $metaModelId = ModelId::fromSerialized(
                $event->getEnvironment()->getInputProvider()->getValue('pid')
            )->getId();
        }

        $metaModelName = $this->factory->translateIdToMetaModelName($metaModelId);
        $metaModel     = $this->factory->getMetaModel($metaModelName);

        if (!$metaModel) {
            return;
        }

        $result = [];

        // Add meta fields.
        $result['meta'] = self::getMetaModelsSystemColumns();

        // Fetch all attributes except for the current attribute.
        foreach ($metaModel->getAttributes() as $attribute) {
            if ($attribute->get('id') === $model->getId()) {
                continue;
            }

            $result['attributes'][$attribute->getColName()] = \sprintf(
                '%s [%s]',
                $attribute->getName(),
                $attribute->get('type')
            );
        }

        $event->setOptions($result);
    }
1077353
public static function getPropertyOptions(GetPropertyOptionsEvent $event)
    {
        if (null !== $event->getOptions()) {
            return;
        }

        $model = $event->getModel();

        if (!($model instanceof Model)) {
            return;
        }
        $attribute = $model->getItem()->getAttribute($event->getPropertyName());

        if (!($attribute instanceof AbstractTags)) {
            return;
        }

        try {
            $options = $attribute->getFilterOptions(null, false);
        } catch (\Exception $exception) {
            $options = ['Error: ' . $exception->getMessage()];
        }

        $event->setOptions($options);
    }
1355932
void onColumnTypeChanged(@Observes ValueChangeEvent<ColumnType> event) {
        PortablePreconditions.checkNotNull("ValueChangeEvent<ColumnType>",
                                           event);
        if (event.getContext().equals(columnType)) {

            // Update the help tooltip when the column type changes
            String columnTypeDescr = getColumnTypeDescription(event.getValue());
            columnType.setHelpContent(DataSetEditorConstants.INSTANCE.attributeColumnType(),
                                      columnTypeDescr,
                                      Placement.RIGHT);
        }
    }
1113542
public function getColumnNames(GetPropertyOptionsEvent $event)
    {
        if (!$this->isBackendOptionRequestFor($event, ['tag_column', 'tag_alias', 'tag_sorting'])) {
            return;
        }

        $result = $this->getColumnNamesFrom($event->getModel()->getProperty('tag_table'));

        if (!empty($result)) {
            \asort($result);
            $event->setOptions($result);
        }
    }
964812
@Override
    public void configurationEvent(ConfigurationEvent event) {
        if (event.getType() == ConfigurationEvent.CM_UPDATED && event.getPid().equals(pid)) {
            processProperties();
            initializeInterceptor();
        }

    }
1147879
public function renderReadablePropertyValue(RenderReadablePropertyValueEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        if (null !== $event->getRendered()) {
            return;
        }

        $property = $event->getProperty();
        $value    = self::decodeValue(
            $event->getEnvironment(),
            $event->getModel(),
            $event->getProperty()->getName(),
            $event->getValue()
        );

        $extra = $property->getExtra();

        self::renderForeignKeyReadable($event, $extra, $value);
        self::renderArrayReadable($event, $value);
        self::renderTimestampReadable($event, $extra, $value);
        self::renderDateTimePropertyIsTstamp($event, $property, $value);
        self::renderSimpleCheckbox($event, $property, $extra, $value);
        self::renderTextAreaReadable($event, $property, $extra, $value);
        self::renderReferenceReadable($event, $extra, $value);

        if (null !== $event->getRendered()) {
            return;
        }

        self::renderDateTimeValueInstance($event, $value);
        self::renderOptionValueReadable($event, $property, $value);
    }
241940
protected static function getOptions($event)
    {
        $extra = $event->getComposer()->getPackage()->getExtra();

        return array_merge(
            array(
                'npm'   => false,
                'bower' => false
            ),
            isset($extra['dependency-tools']) ? $extra['dependency-tools'] : array()
        );
    }
83931
public function getColumns($table)
    {
        //Argument 1 must be a string
        Argument::i()->test(1, 'string');
        
        $query = $this->utility()->showColumns($table);
        $results = $this->query($query, $this->getBinds());
        
        $columns = array();
        foreach ($results as $column) {
            $key = null;
            if ($column['pk'] == 1) {
                $key = 'PRI';
            }
            
            $columns[] = array(
                'Field'     => $column['name'],
                'Type'      => $column['type'],
                'Default'   => $column['dflt_value'],
                'Null'      => $column['notnull'] != 1,
                'Key'       => $key);
        }
        
        return $columns;
    }
650745
public function getOptions(GetPropertyOptionsEvent $event)
    {
        if (('range_template' !== $event->getPropertyName())
            || ('tl_metamodel_filtersetting' !== $event->getEnvironment()->getDataDefinition()->getName())
        ) {
            return;
        }

        $event->setOptions($this->templateList->getTemplatesForBase('mm_filteritem_'));
    }
669957
final public function getFieldType(string $table, string $column): string
    {
        /* @noinspection PhpUnhandledExceptionInspection */
        return $this->getColumnsMetadata($table)['fieldTypes'][$column];
    }
1237892
public function getPluginCalendarEvents(Event $event, EntityInterface $calendar, array $options = []): void
    {
        /** @var \Qobo\Calendar\Model\Table\CalendarEventsTable $table */
        $table = TableRegistry::get('Qobo/Calendar.CalendarEvents');

        $events = $table->getEvents($calendar, $options);

        $event->result = $events;
    }
1225141
public function getTableColumns($table, $typeOnly = true)
	{
		$result = array();

		$table_temp = $this->replacePrefix((string) $table);

		// Set the query to get the table fields statement.
		$this->setQuery(
			'SELECT column_name as Field, data_type as Type, is_nullable as \'Null\', column_default as \'Default\'' .
			' FROM information_schema.columns' . ' WHERE table_name = ' . $this->quote($table_temp)
		);
		$fields = $this->loadObjectList();

		// If we only want the type as the value add just that to the list.
		if ($typeOnly)
		{
			foreach ($fields as $field)
			{
				$result[$field->Field] = preg_replace("/[(0-9)]/", '', $field->Type);
			}
		}
		else
		// If we want the whole field data object add that to the list.
		{
			foreach ($fields as $field)
			{
				$result[$field->Field] = $field;
			}
		}

		return $result;
	}
835382
public function getArgs($event)
    {
        return [
            $event->getModel()->getPropertiesAsArray(),
            $event->getLabel(),
            new DcCompat($event->getEnvironment(), $event->getModel()),
            $event->getArgs()
        ];
    }