sentence1
stringlengths 52
3.87M
| sentence2
stringlengths 1
47.2k
| label
stringclasses 1
value |
---|---|---|
protected function getFilterPager(Query $query, $currentPage, $maxPerPage)
{
$adapter = new FilterAdapter($query, $this->getSite()->getFilterService());
$pager = new Pagerfanta($adapter);
$pager->setNormalizeOutOfRangePages(true);
$pager->setMaxPerPage($maxPerPage);
$pager->setCurrentPage($currentPage);
return $pager;
} | Return Pagerfanta instance using FilterAdapter for the given $query.
@param \eZ\Publish\API\Repository\Values\Content\Query $query
@param int $currentPage
@param int $maxPerPage
@return \Pagerfanta\Pagerfanta | entailment |
protected function getFindPager(Query $query, $currentPage, $maxPerPage)
{
$adapter = new FindAdapter($query, $this->getSite()->getFindService());
$pager = new Pagerfanta($adapter);
$pager->setNormalizeOutOfRangePages(true);
$pager->setMaxPerPage($maxPerPage);
$pager->setCurrentPage($currentPage);
return $pager;
} | Return Pagerfanta instance using FindAdapter for the given $query.
@param \eZ\Publish\API\Repository\Values\Content\Query $query
@param int $currentPage
@param int $maxPerPage
@return \Pagerfanta\Pagerfanta | entailment |
public function getView(View $view)
{
if (($configHash = $this->matcherFactory->match($view)) === null) {
return null;
}
// We can set the collection directly to the view, no need to go through DTO
$view->addParameters([
ContentView::QUERY_DEFINITION_COLLECTION_NAME => $this->getQueryDefinitionCollection($configHash, $view),
]);
// Return DTO so that Configurator can set the data back to the $view
return $this->getDTO($configHash);
} | @inheritdoc
Returns view as a data transfer object.
@throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType | entailment |
private function getDTO(array $viewConfig)
{
$dto = new CoreContentView();
$dto->setConfigHash($viewConfig);
if (isset($viewConfig['template'])) {
$dto->setTemplateIdentifier($viewConfig['template']);
}
if (isset($viewConfig['controller'])) {
$dto->setControllerReference(new ControllerReference($viewConfig['controller']));
}
if (isset($viewConfig['params']) && is_array($viewConfig['params'])) {
$dto->addParameters($viewConfig['params']);
}
return $dto;
} | Builds a ContentView object from $viewConfig.
@throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType
@param array $viewConfig
@return \eZ\Publish\Core\MVC\Symfony\View\ContentView | entailment |
protected function register_assets() {
$icon_picker = Icon_Picker::instance();
if ( defined( 'ICON_PICKER_SCRIPT_DEBUG' ) && ICON_PICKER_SCRIPT_DEBUG ) {
$assets_url = '//localhost:8080';
$suffix = '';
} else {
$assets_url = $icon_picker->url;
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
}
wp_register_script(
'icon-picker',
"{$assets_url}/js/icon-picker{$suffix}.js",
array( 'media-views' ),
Icon_Picker::VERSION,
true
);
$this->add_script( 'icon-picker' );
wp_register_style(
'icon-picker',
"{$icon_picker->url}/css/icon-picker{$suffix}.css",
false,
Icon_Picker::VERSION
);
$this->add_style( 'icon-picker' );
} | Register scripts & styles
@since 0.1.0
@since 0.5.0 Use webpack dev server's URL as the asset URL.
@access protected
@return void | entailment |
public function load() {
if ( ! is_admin() ) {
_doing_it_wrong(
__METHOD__,
'It should only be called on admin pages.',
esc_html( Icon_Picker::VERSION )
);
return;
}
if ( ! did_action( 'icon_picker_loader_init' ) ) {
_doing_it_wrong(
__METHOD__,
sprintf(
'It should not be called until the %s hook.',
'<code>icon_picker_loader_init</code>'
),
esc_html( Icon_Picker::VERSION )
);
return;
}
add_action( 'admin_enqueue_scripts', array( $this, '_enqueue_assets' ) );
add_action( 'print_media_templates', array( $this, '_media_templates' ) );
} | Load admin functionalities
@since 0.1.0
@return void | entailment |
public function _enqueue_assets() {
$icon_picker = Icon_Picker::instance();
wp_localize_script(
'icon-picker',
'iconPicker',
array(
'types' => $icon_picker->registry->get_types_for_js(),
)
);
// Some pages don't call this by default, so let's make sure.
wp_enqueue_media();
foreach ( $this->script_ids as $script_id ) {
wp_enqueue_script( $script_id );
}
foreach ( $this->style_ids as $style_id ) {
wp_enqueue_style( $style_id );
}
/**
* Fires when admin functionality is loaded
*
* @since 0.1.0
* @param Icon_Picker $icon_picker Icon_Picker instance.
*/
do_action( 'icon_picker_admin_loaded', $icon_picker );
} | Enqueue scripts & styles
@since 0.1.0
@wp_hook action admin_enqueue_scripts
@return void | entailment |
public function _media_templates() {
$icon_picker = Icon_Picker::instance();
foreach ( $icon_picker->registry->types as $type ) {
if ( empty( $type->templates ) ) {
continue;
}
$template_id_prefix = "tmpl-iconpicker-{$type->template_id}";
if ( in_array( $template_id_prefix, $this->printed_templates, true ) ) {
continue;
}
foreach ( $type->templates as $template_id_suffix => $template ) {
$this->_print_template( "{$template_id_prefix}-{$template_id_suffix}", $template );
}
$this->printed_templates[] = $template_id_prefix;
}
/**
* Fires after all media templates have been printed
*
* @since 0.1.0
* @param Icon_Picker $icon_picker Icon Picker instance.
*/
do_action( 'icon_picker_print_media_templates', $icon_picker );
} | Media templates
@since 0.1.0
@wp_hook action print_media_templates
@return void | entailment |
protected function collect_packs() {
$iterator = new DirectoryIterator( $this->dir );
foreach ( $iterator as $pack_dir ) {
if ( $pack_dir->isDot() || ! $pack_dir->isDir() || ! $pack_dir->isReadable() ) {
continue;
}
$pack_dirname = $pack_dir->getFilename();
$pack_data = $this->get_pack_data( $pack_dir );
if ( ! empty( $pack_data ) ) {
$this->packs[ $pack_dirname ] = $pack_data;
}
}
} | Collect icon packs
@since 0.1.0
@access protected
@return void | entailment |
protected function register_packs() {
if ( empty( $this->packs ) ) {
return;
}
$icon_picker = Icon_Picker::instance();
require_once "{$icon_picker->dir}/includes/types/fontello.php";
foreach ( $this->packs as $pack_data ) {
$icon_picker->registry->add( new Icon_Picker_Type_Fontello( $pack_data ) );
}
} | Register icon packs
@since 0.1.0
@access protected
@return void | entailment |
protected function get_pack_data( DirectoryIterator $pack_dir ) {
$pack_dirname = $pack_dir->getFilename();
$pack_path = $pack_dir->getPathname();
$cache_id = "icon_picker_fontpack_{$pack_dirname}";
$cache_data = get_transient( $cache_id );
$config_file = "{$pack_path}/config.json";
if ( false !== $cache_data && $cache_data['version'] === $pack_dir->getMTime() ) {
return $cache_data;
}
// Make sure the config file exists and is readable.
if ( ! is_readable( $config_file ) ) {
trigger_error(
sprintf(
esc_html( $this->messages['no_config'] ),
'<code>config.json</code>',
sprintf( '<code>%s</code>', esc_html( $pack_path ) )
)
);
return false;
}
$config = json_decode( file_get_contents( $config_file ), true );
$errors = json_last_error();
if ( ! empty( $errors ) ) {
trigger_error(
sprintf(
esc_html( $this->messages['config_error'] ),
sprintf( '<code>%s/config.json</code>', esc_html( $pack_path ) )
)
);
return false;
}
$keys = array( 'name', 'glyphs', 'css_prefix_text' );
$items = array();
// Check each required config.
foreach ( $keys as $key ) {
if ( empty( $config[ $key ] ) ) {
trigger_error(
sprintf(
esc_html( $this->messages['invalid'] ),
sprintf( '<code><em>%s</em></code>', esc_html( $key ) ),
esc_html( $config_file )
)
);
return false;
}
}
// Bail if no glyphs found.
if ( ! is_array( $config['glyphs'] ) || empty( $config['glyphs'] ) ) {
return false;
}
foreach ( $config['glyphs'] as $glyph ) {
if ( ! empty( $glyph['css'] ) ) {
$items[] = array(
'id' => $config['css_prefix_text'] . $glyph['css'],
'name' => $glyph['css'],
);
}
}
if ( empty( $items ) ) {
return false;
}
$pack_data = array(
'id' => "pack-{$config['name']}",
'name' => sprintf( __( 'Pack: %s', 'icon-picker' ), $config['name'] ),
'version' => $pack_dir->getMTime(),
'items' => $items,
'stylesheet_uri' => "{$this->url}/{$pack_dirname}/css/{$config['name']}.css",
'dir' => "{$this->dir}/{$pack_dirname}",
'url' => "{$this->url}/{$pack_dirname}",
);
set_transient( $cache_id, $pack_data, DAY_IN_SECONDS );
return $pack_data;
} | Get icon pack data
@since 0.1.0
@access protected
@param DirectoryIterator $pack_dir Icon pack directory object.
@return array Icon pack data array or FALSE. | entailment |
public function get($name)
{
if (array_key_exists($name, $this->queryDefinitionMap)) {
return $this->queryDefinitionMap[$name];
}
throw new OutOfBoundsException(
"Could not find QueryDefinition with name '{$name}'"
);
} | Return QueryDefinition by given $name.
@throws \OutOfBoundsException If no QueryDefinition with given $name is found.
@param $name
@return \Netgen\Bundle\EzPlatformSiteApiBundle\QueryType\QueryDefinition | entailment |
protected function sendRequest($method, $url, $body)
{
$options = [
'headers' => [
'Accept-Encoding' => 'gzip',
'Content-Type' => 'application/json',
],
'body' => $body,
];
try {
$response = $this->client->request($method, $url, $options);
return json_decode($response->getBody(), true);
} catch (ClientException $e) {
throw new PredictionIOAPIError($e->getMessage());
}
} | Send a HTTP request to the server
@param string $method HTTP request method
@param string $url Relative or absolute url
@param string $body HTTP request body
@return array JSON response
@throws PredictionIOAPIError Request error | entailment |
protected function getFilterCriteria(array $parameters)
{
/** @var \Netgen\EzPlatformSiteApi\API\Values\Content $content */
$content = $parameters['content'];
$fields = (array) $parameters['relation_field'];
$idsGrouped = [[]];
foreach ($fields as $identifier) {
if (!$content->hasField($identifier)) {
throw new InvalidArgumentException(
"Content does not contain field '{$identifier}'"
);
}
$field = $content->getField($identifier);
$relationResolver = $this->relationResolverRegistry->get($field->fieldTypeIdentifier);
$idsGrouped[] = $relationResolver->getRelationIds($field);
}
$relatedContentIds = array_merge(...$idsGrouped);
if (empty($relatedContentIds)) {
return new MatchNone();
}
return new ContentId($relatedContentIds);
} | {@inheritdoc}
@throws \LogicException
@throws \OutOfBoundsException
@throws \InvalidArgumentException | entailment |
public function setUser($uid, array $properties=array(), $eventTime=null)
{
$eventTime = $this->getEventTime($eventTime);
// casting to object so that an empty array would be represented as {}
if (empty($properties)) {
$properties = (object)$properties;
}
$json = json_encode([
'event' => '$set',
'entityType' => 'user',
'entityId' => $uid,
'properties' => $properties,
'eventTime' => $eventTime,
]);
return $this->sendRequest('POST', $this->eventUrl, $json);
} | Set a user entity
@param int|string User Id
@param array Properties of the user entity to set
@param string Time of the event in ISO 8601 format
(e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
@return string JSON response
@throws PredictionIOAPIError Request error | entailment |
public function unsetUser($uid, array $properties, $eventTime=null)
{
$eventTime = $this->getEventTime($eventTime);
if (empty($properties)) {
throw new PredictionIOAPIError('Specify at least one property');
}
$json = json_encode([
'event' => '$unset',
'entityType' => 'user',
'entityId' => $uid,
'properties' => $properties,
'eventTime' => $eventTime,
]);
return $this->sendRequest('POST', $this->eventUrl, $json);
} | Unset a user entity
@param int|string User Id
@param array Properties of the user entity to unset
@param string Time of the event in ISO 8601 format
(e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
@return string JSON response
@throws PredictionIOAPIError Request error | entailment |
public function deleteUser($uid, $eventTime=null)
{
$eventTime = $this->getEventTime($eventTime);
$json = json_encode([
'event' => '$delete',
'entityType' => 'user',
'entityId' => $uid,
'eventTime' => $eventTime,
]);
return $this->sendRequest('POST', $this->eventUrl, $json);
} | Delete a user entity
@param int|string User Id
@param string Time of the event in ISO 8601 format
(e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
@return string JSON response
@throws PredictionIOAPIError Request error | entailment |
public function setItem($iid, array $properties=array(), $eventTime=null)
{
$eventTime = $this->getEventTime($eventTime);
if (empty($properties)) {
$properties = (object)$properties;
}
$json = json_encode([
'event' => '$set',
'entityType' => 'item',
'entityId' => $iid,
'properties' => $properties,
'eventTime' => $eventTime,
]);
return $this->sendRequest('POST', $this->eventUrl, $json);
} | Set an item entity
@param int|string Item Id
@param array Properties of the item entity to set
@param string Time of the event in ISO 8601 format
(e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
@return string JSON response
@throws PredictionIOAPIError Request error | entailment |
public function unsetItem($iid, array $properties, $eventTime=null)
{
$eventTime = $this->getEventTime($eventTime);
if (empty($properties)) {
throw new PredictionIOAPIError('Specify at least one property');
}
$json = json_encode([
'event' => '$unset',
'entityType' => 'item',
'entityId' => $iid,
'properties' => $properties,
'eventTime' => $eventTime,
]);
return $this->sendRequest('POST', $this->eventUrl, $json);
} | Unset an item entity
@param int|string Item Id
@param array Properties of the item entity to unset
@param string Time of the event in ISO 8601 format
(e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
@return string JSON response
@throws PredictionIOAPIError Request error | entailment |
public function deleteItem($iid, $eventTime=null)
{
$eventTime = $this->getEventTime($eventTime);
$json = json_encode([
'event' => '$delete',
'entityType' => 'item',
'entityId' => $iid,
'eventTime' => $eventTime,
]);
return $this->sendRequest('POST', $this->eventUrl, $json);
} | Delete an item entity
@param int|string Item Id
@param string Time of the event in ISO 8601 format
(e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
@return string JSON response
@throws PredictionIOAPIError Request error | entailment |
public function recordUserActionOnItem(
$event,
$uid,
$iid,
array $properties=array(),
$eventTime=null
) {
$eventTime = $this->getEventTime($eventTime);
if (empty($properties)) {
$properties = (object)$properties;
}
$json = json_encode([
'event' => $event,
'entityType' => 'user',
'entityId' => $uid,
'targetEntityType' => 'item',
'targetEntityId' => $iid,
'properties' => $properties,
'eventTime' => $eventTime,
]);
return $this->sendRequest('POST', $this->eventUrl, $json);
} | Record a user action on an item
@param string Event name
@param int|string User Id
@param int|string Item Id
@param array Properties of the event
@param string Time of the event in ISO 8601 format
(e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
@return string JSON response
@throws PredictionIOAPIError Request error | entailment |
public function createEvent(array $data)
{
$json = json_encode($data);
return $this->sendRequest('POST', $this->eventUrl, $json);
} | Create an event
@param array An array describing the event
@return string JSON response
@throws PredictionIOAPIError Request error | entailment |
final public function getQuery(array $parameters = [])
{
$parameters = $this->getOptionsResolver()->resolve($parameters);
$query = $this->buildQuery();
$sortDefinitions = $parameters['sort'];
if (!is_array($sortDefinitions)) {
$sortDefinitions = [$sortDefinitions];
}
$query->query = $this->getQueryCriterion($parameters);
$query->filter = $this->resolveFilterCriteria($parameters);
$query->facetBuilders = $this->getFacetBuilders($parameters);
$query->sortClauses = $this->getSortClauses($sortDefinitions);
$query->limit = $parameters['limit'];
$query->offset = $parameters['offset'];
return $query;
} | {@inheritdoc}
@throws \InvalidArgumentException
@throws \Symfony\Component\OptionsResolver\Exception\ExceptionInterface|\InvalidArgumentException
@throws \RuntimeException | entailment |
protected function configureBaseOptions(OptionsResolver $resolver)
{
$resolver->setDefined([
'content_type',
'field',
'publication_date',
'section',
'state',
]);
$resolver->setDefaults([
'sort' => [],
'limit' => 25,
'offset' => 0,
]);
$resolver->setAllowedTypes('content_type', ['string', 'array']);
$resolver->setAllowedTypes('section', ['string', 'array']);
$resolver->setAllowedTypes('field', ['array']);
$resolver->setAllowedTypes('limit', ['int']);
$resolver->setAllowedTypes('offset', ['int']);
$resolver->setAllowedTypes('publication_date', ['int', 'string', 'array']);
$resolver->setAllowedTypes('state', ['array']);
$identifierValuesCallback = function ($identifiers) {
if (!is_array($identifiers)) {
return true;
}
foreach ($identifiers as $identifier) {
if (!is_string($identifier)) {
return false;
}
}
return true;
};
$resolver->setAllowedValues('content_type', $identifierValuesCallback);
$resolver->setAllowedValues('section', $identifierValuesCallback);
$resolver->setAllowedValues(
'publication_date',
function ($dates) {
if (!is_array($dates)) {
return true;
}
foreach ($dates as $date) {
if (!is_int($date) && !is_string($date)) {
return false;
}
}
return true;
}
);
$class = SortClause::class;
$resolver->setAllowedTypes('sort', ['string', $class, 'array']);
} | Configure $resolver for the QueryType.
@throws \Symfony\Component\OptionsResolver\Exception\ExceptionInterface
@param \Symfony\Component\OptionsResolver\OptionsResolver $resolver | entailment |
private function buildBaseCriteria(array $parameters)
{
$criteriaGrouped = [[]];
foreach ($parameters as $name => $value) {
switch ($name) {
case 'content_type':
case 'depth':
case 'main':
case 'parent_location_id':
case 'priority':
case 'publication_date':
case 'section':
case 'subtree':
case 'visible':
$definitions = $this->getCriterionDefinitionResolver()->resolve($name, $value);
break;
case 'field':
case 'state':
$definitions = $this->getCriterionDefinitionResolver()->resolveTargets($name, $value);
break;
default:
continue 2;
}
$criteriaGrouped[] = $this->getCriteriaBuilder()->build($definitions);
}
return array_merge(...$criteriaGrouped);
} | Build criteria for the base supported options.
@param array $parameters
@throws \InvalidArgumentException
@throws \RuntimeException
@return \eZ\Publish\API\Repository\Values\Content\Query\Criterion[] | entailment |
private function resolveFilterCriteria(array $parameters)
{
$baseCriteria = $this->buildBaseCriteria($parameters);
$registeredCriteria = $this->buildRegisteredCriteria($parameters);
$filterCriteria = $this->getFilterCriteria($parameters);
if (null === $filterCriteria) {
$filterCriteria = [];
}
if ($filterCriteria instanceof Criterion) {
$filterCriteria = [$filterCriteria];
}
$criteria = array_merge($baseCriteria, $registeredCriteria, $filterCriteria);
if (empty($criteria)) {
return null;
}
if (1 === count($criteria)) {
return $criteria[0];
}
return new LogicalAnd($criteria);
} | @param array $parameters
@throws \InvalidArgumentException
@throws \RuntimeException
@return \eZ\Publish\API\Repository\Values\Content\Query\Criterion|null | entailment |
private function getSortClauses(array $parameters)
{
$sortClauses = [];
foreach ($parameters as $parameter) {
if (is_string($parameter)) {
$parameter = $this->parseSortString($parameter);
}
if (is_string($parameter)) {
$parameter = $this->parseCustomSortString($parameter);
}
$sortClauses[] = $parameter;
}
return $sortClauses;
} | Return an array of SortClause instances from the given $parameters.
@throws \InvalidArgumentException
@param array $parameters
@return \eZ\Publish\API\Repository\Values\Content\Query\SortClause[] | entailment |
public function execute(QueryDefinition $queryDefinition, $usePager)
{
$queryType = $this->queryTypeRegistry->getQueryType($queryDefinition->name);
$query = $queryType->getQuery($queryDefinition->parameters);
if ($usePager) {
return $this->getPager($query, $queryDefinition);
}
if ($query instanceof LocationQuery) {
return $this->getLocationResult($query, $queryDefinition);
}
if ($query instanceof Query) {
return $this->getContentResult($query, $queryDefinition);
}
throw new RuntimeException('Could not handle given query');
} | Execute the Query with the given $name and return the result.
@throws \Pagerfanta\Exception\Exception
@throws \RuntimeException
@param \Netgen\Bundle\EzPlatformSiteApiBundle\QueryType\QueryDefinition $queryDefinition
@param bool $usePager
@return \eZ\Publish\API\Repository\Values\Content\Search\SearchResult|\Pagerfanta\Pagerfanta | entailment |
private function getPager(Query $query, QueryDefinition $queryDefinition)
{
if ($queryDefinition->useFilter) {
$adapter = new FilterAdapter($query, $this->filterService);
} else {
$adapter = new FindAdapter($query, $this->findService);
}
$pager = new Pagerfanta($adapter);
$pager->setNormalizeOutOfRangePages(true);
$pager->setMaxPerPage($queryDefinition->maxPerPage);
$pager->setCurrentPage($queryDefinition->page);
return $pager;
} | Return Pagerfanta instance by the given parameters.
@throws \Pagerfanta\Exception\Exception
@param \eZ\Publish\API\Repository\Values\Content\Query $query
@param \Netgen\Bundle\EzPlatformSiteApiBundle\QueryType\QueryDefinition $queryDefinition
@return \Pagerfanta\Pagerfanta | entailment |
private function getLocationResult(LocationQuery $query, QueryDefinition $queryDefinition)
{
if ($queryDefinition->useFilter) {
return $this->filterService->filterLocations($query);
}
return $this->findService->findLocations($query);
} | Return search result by the given parameters.
@param \eZ\Publish\API\Repository\Values\Content\LocationQuery $query
@param \Netgen\Bundle\EzPlatformSiteApiBundle\QueryType\QueryDefinition $queryDefinition
@return \eZ\Publish\API\Repository\Values\Content\Search\SearchResult | entailment |
private function getContentResult(Query $query, QueryDefinition $queryDefinition)
{
if ($queryDefinition->useFilter) {
return $this->filterService->filterContent($query);
}
return $this->findService->findContent($query);
} | Return search result by the given parameters.
@param \eZ\Publish\API\Repository\Values\Content\Query $query
@param \Netgen\Bundle\EzPlatformSiteApiBundle\QueryType\QueryDefinition $queryDefinition
@return \eZ\Publish\API\Repository\Values\Content\Search\SearchResult | entailment |
public function process($value, ContentView $view)
{
if (!is_string($value) || 0 !== strpos($value, '@=')) {
return $value;
}
$language = new ExpressionLanguage();
$this->registerFunctions($language);
return $language->evaluate(
substr($value, 2),
[
'view' => $view,
'location' => $view->getSiteLocation(),
'content' => $view->getSiteContent(),
'request' => $this->requestStack->getCurrentRequest(),
]
);
} | Return given $value processed with ExpressionLanguage if needed.
Parameter $view is used to provide values for evaluation.
@param mixed $value
@param \Netgen\Bundle\EzPlatformSiteApiBundle\View\ContentView $view
@return mixed | entailment |
private function registerFunctions(ExpressionLanguage $expressionLanguage)
{
$expressionLanguage->register(
'viewParam',
function () {},
function ($arguments, $name, $default) {
/** @var \Netgen\Bundle\EzPlatformSiteApiBundle\View\ContentView $view */
$view = $arguments['view'];
if ($view->hasParameter($name)) {
return $view->getParameter($name);
}
return $default;
}
);
$expressionLanguage->register(
'queryParam',
function () {},
function ($arguments, $name, $default) {
/** @var \Symfony\Component\HttpFoundation\Request $request */
$request = $arguments['request'];
return $request->query->get($name, $default);
}
);
$expressionLanguage->register(
'timestamp',
function () {},
function ($arguments, $timeString) {
return strtotime($timeString);
}
);
} | Register functions with the given $expressionLanguage.
@param \Symfony\Component\ExpressionLanguage\ExpressionLanguage $expressionLanguage | entailment |
public function addSemanticConfig(NodeBuilder $nodeBuilder)
{
$nodeBuilder
->arrayNode(static::NODE_KEY)
->info(static::INFO)
->useAttributeAsKey('key')
->normalizeKeys(false)
->prototype('array')
->useAttributeAsKey('key')
->normalizeKeys(false)
->info("View selection rulesets, grouped by view type. Key is the view type (e.g. 'full', 'line', ...)")
->prototype('array')
->children()
->scalarNode('template')->info('Your template path, as MyBundle:subdir:my_template.html.twig')->end()
->scalarNode('controller')
->info(
<<<EOT
Use custom controller instead of the default one to display a content matching your rules.
You can use the controller reference notation supported by Symfony.
EOT
)
->example('MyBundle:MyControllerClass:view')
->end()
->arrayNode('match')
->info('Condition matchers configuration')
->isRequired()
->useAttributeAsKey('key')
->prototype('variable')->end()
->end()
->append($this->getQueryNode(static::QUERY_KEY))
->arrayNode('params')
->info(
<<<EOT
Arbitrary params that will be passed in the ContentView object, manageable by ViewProviders.
Those params will NOT be passed to the resulting view template by default.
EOT
)
->example(
[
'foo' => '%some.parameter.reference%',
'osTypes' => ['osx', 'linux', 'windows'],
]
)
->useAttributeAsKey('key')
->prototype('variable')->end()
->end()
->end()
->end()
->end()
->end();
} | Adds semantic configuration definition.
@param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system.<siteaccess> | entailment |
private function getQueryNode($name)
{
$queries = new ArrayNodeDefinition($name);
$queries
->info('Query configuration')
->useAttributeAsKey('key')
->prototype('array')
->beforeNormalization()
// String value is a shortcut to the named query
->ifString()
->then(function ($v) {return ['named_query' => $v];})
->end()
->children()
->scalarNode('query_type')
->info('Name of the QueryType implementation')
->end()
->scalarNode('use_filter')
->info('Whether to use FilterService of FindService')
->end()
->scalarNode('max_per_page')
->info('Number of results per page when using pager')
->end()
->scalarNode('page')
->info('Current page when using pager')
->end()
->arrayNode('parameters')
->info('Parameters for the QueryType implementation')
->useAttributeAsKey('key')
->prototype('variable')->end()
->end()
->scalarNode('named_query')
->info('Name of the configured query')
->end()
->end()
->validate()
->ifTrue(function ($v) {
return array_key_exists('named_query', $v) && array_key_exists('query_type', $v);
})
->thenInvalid(
'You cannot use both "named_query" and "query_type" at the same time.'
)
->end()
->validate()
->ifTrue(function ($v) {
return !array_key_exists('named_query', $v) && !array_key_exists('query_type', $v);
})
->thenInvalid(
'One of "named_query" or "query_type" must be set.'
)
->end()
->validate()
->ifTrue(function ($v) {return array_key_exists('query_type', $v);})
->then(function ($v) {
if (!array_key_exists('use_filter', $v)) {
$v['use_filter'] = true;
}
if (!array_key_exists('max_per_page', $v)) {
$v['max_per_page'] = 25;
}
if (!array_key_exists('page', $v)) {
$v['page'] = 1;
}
if (!array_key_exists('parameters', $v)) {
$v['parameters'] = [];
}
return $v;
})
->end()
->end()
->validate()
->ifTrue(function ($v) {
foreach (array_keys($v) as $key) {
if (!is_string($key) || !preg_match(Twig_Lexer::REGEX_NAME, $key)) {
return true;
}
}
return false;
})
->thenInvalid(
'Query keys must be strings conforming to a valid Twig variable names.'
);
return $queries;
} | @param string $name
@return \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition | entailment |
public function build(array $definitions)
{
$criteria = [];
foreach ($definitions as $definition) {
$criterion = $this->dispatchBuild($definition);
if ($criterion instanceof Criterion) {
$criteria[] = $criterion;
}
}
return $criteria;
} | Build criteria for the given array of criterion $definitions.
@param \Netgen\EzPlatformSiteApi\Core\Site\QueryType\CriterionDefinition[] $definitions
@throws \InvalidArgumentException
@return \eZ\Publish\API\Repository\Values\Content\Query\Criterion[] | entailment |
private function dispatchBuild(CriterionDefinition $definition)
{
switch ($definition->name) {
case 'content_type':
return $this->buildContentTypeIdentifier($definition);
case 'depth':
return $this->buildDepth($definition);
case 'field':
return $this->buildField($definition);
case 'main':
return $this->buildIsMainLocation($definition);
case 'not':
return $this->buildLogicalNot($definition);
case 'parent_location_id':
return $this->buildParentLocationId($definition);
case 'priority':
return $this->buildPriority($definition);
case 'publication_date':
return $this->buildDateMetadataCreated($definition);
case 'section':
return $this->buildSection($definition);
case 'state':
return $this->buildObjectState($definition);
case 'subtree':
return $this->buildSubtree($definition);
case 'visible':
return $this->buildVisibility($definition);
}
throw new InvalidArgumentException(
"Criterion named '{$definition->name}' is not handled"
);
} | Build criterion $name from the given criterion $definition.
@param \Netgen\EzPlatformSiteApi\Core\Site\QueryType\CriterionDefinition $definition
@throws \InvalidArgumentException
@return null|Criterion | entailment |
private function buildField(CriterionDefinition $definition)
{
return new Field(
$definition->target,
$definition->operator,
$definition->value
);
} | @param \Netgen\EzPlatformSiteApi\Core\Site\QueryType\CriterionDefinition $definition
@throws \InvalidArgumentException
@return \eZ\Publish\API\Repository\Values\Content\Query\Criterion\Field | entailment |
private function buildIsMainLocation(CriterionDefinition $definition)
{
if (null === $definition->value) {
return null;
}
$isMainLocation = $definition->value ? IsMainLocation::MAIN : IsMainLocation::NOT_MAIN;
return new IsMainLocation($isMainLocation);
} | @param \Netgen\EzPlatformSiteApi\Core\Site\QueryType\CriterionDefinition $definition
@throws \InvalidArgumentException
@return null|IsMainLocation | entailment |
private function buildLogicalNot(CriterionDefinition $definition)
{
$criteria = $this->build($definition->value);
if (1 === count($criteria)) {
$criteria = reset($criteria);
} else {
$criteria = new LogicalAnd($criteria);
}
return new LogicalNot($criteria);
} | @param \Netgen\EzPlatformSiteApi\Core\Site\QueryType\CriterionDefinition $definition
@throws \InvalidArgumentException
@return \eZ\Publish\API\Repository\Values\Content\Query\Criterion\LogicalNot | entailment |
private function buildDateMetadataCreated(CriterionDefinition $definition)
{
return new DateMetadata(
DateMetadata::CREATED,
$definition->operator,
$this->resolveTimeValues($definition->value)
);
} | @param \Netgen\EzPlatformSiteApi\Core\Site\QueryType\CriterionDefinition $definition
@throws \InvalidArgumentException
@return \eZ\Publish\API\Repository\Values\Content\Query\Criterion\DateMetadata | entailment |
private function resolveTimeValues($valueOrValues)
{
if (!is_array($valueOrValues)) {
return $this->resolveTimeValue($valueOrValues);
}
$returnValues = [];
foreach ($valueOrValues as $key => $value) {
$returnValues[$key] = $this->resolveTimeValue($value);
}
return $returnValues;
} | @param $valueOrValues
@throws \InvalidArgumentException
@return array|false|int | entailment |
private function resolveTimeValue($value)
{
if (is_int($value)) {
return $value;
}
$timestamp = strtotime($value);
if (false === $timestamp) {
throw new InvalidArgumentException(
"'{$value}' is invalid time string"
);
}
return $timestamp;
} | @param $value
@throws \InvalidArgumentException
@return int | entailment |
private function buildVisibility(CriterionDefinition $definition)
{
if (null === $definition->value) {
return null;
}
$isVisible = $definition->value ? Visibility::VISIBLE : Visibility::HIDDEN;
return new Visibility($isVisible);
} | @param \Netgen\EzPlatformSiteApi\Core\Site\QueryType\CriterionDefinition $definition
@throws \InvalidArgumentException
@return null|Visibility | entailment |
protected function createContentSearchPager(Query $query, $currentPage, $maxPerPage)
{
@trigger_error(
'PagerfantaFindTrait is deprecated since version 2.5 and will be removed in 3.0. Use PagerfantaTrait instead.',
E_USER_DEPRECATED
);
$adapter = new ContentSearchAdapter($query, $this->getSite()->getFindService());
return $this->getPager($adapter, $currentPage, $maxPerPage);
} | Returns Pagerfanta pager that starts from first page
configured with
ContentSearchAdapter and FindService
@param \eZ\Publish\API\Repository\Values\Content\Query $query
@param int $currentPage
@param int $maxPerPage
@return \Pagerfanta\Pagerfanta | entailment |
protected function createContentSearchHitPager(Query $query, $currentPage, $maxPerPage)
{
@trigger_error(
'PagerfantaFindTrait is deprecated since version 2.5 and will be removed in 3.0. Use PagerfantaTrait instead.',
E_USER_DEPRECATED
);
$adapter = new ContentSearchHitAdapter($query, $this->getSite()->getFindService());
return $this->getPager($adapter, $currentPage, $maxPerPage);
} | Returns Pagerfanta pager that starts from first page
configured with
ContentSearchHitAdapter and FindService
@param \eZ\Publish\API\Repository\Values\Content\Query $query
@param int $currentPage
@param int $maxPerPage
@return \Pagerfanta\Pagerfanta | entailment |
protected function createLocationSearchPager(LocationQuery $locationQuery, $currentPage, $maxPerPage)
{
@trigger_error(
'PagerfantaFindTrait is deprecated since version 2.5 and will be removed in 3.0. Use PagerfantaTrait instead.',
E_USER_DEPRECATED
);
$adapter = new LocationSearchAdapter($locationQuery, $this->getSite()->getFindService());
return $this->getPager($adapter, $currentPage, $maxPerPage);
} | Returns Pagerfanta pager that starts from first page
configured with
LocationSearchAdapter and FindService
@param \eZ\Publish\API\Repository\Values\Content\LocationQuery $locationQuery
@param int $currentPage
@param int $maxPerPage
@return \Pagerfanta\Pagerfanta | entailment |
protected function createLocationSearchHitPager(LocationQuery $locationQuery, $currentPage, $maxPerPage)
{
@trigger_error(
'PagerfantaFindTrait is deprecated since version 2.5 and will be removed in 3.0. Use PagerfantaTrait instead.',
E_USER_DEPRECATED
);
$adapter = new LocationSearchHitAdapter($locationQuery, $this->getSite()->getFindService());
return $this->getPager($adapter, $currentPage, $maxPerPage);
} | Returns Pagerfanta pager that starts from first page
configured with
LocationSearchHitAdapter and FindService
@param \eZ\Publish\API\Repository\Values\Content\LocationQuery $locationQuery
@param int $currentPage
@param int $maxPerPage
@return \Pagerfanta\Pagerfanta | entailment |
protected function getPager(AdapterInterface $adapter, $currentPage, $maxPerPage)
{
@trigger_error(
'PagerfantaFindTrait is deprecated since version 2.5 and will be removed in 3.0. Use PagerfantaTrait instead.',
E_USER_DEPRECATED
);
$pager = new Pagerfanta($adapter);
$pager->setNormalizeOutOfRangePages(true);
$pager->setMaxPerPage($maxPerPage);
$pager->setCurrentPage($currentPage);
return $pager;
} | Shorthand method for creating Pagerfanta pager
with preconfigured Adapter
@param \Pagerfanta\Adapter\AdapterInterface $adapter
@param int $currentPage
@param int $maxPerPage
@return \Pagerfanta\Pagerfanta | entailment |
public function getNbResults()
{
if (isset($this->nbResults)) {
return $this->nbResults;
}
$countQuery = clone $this->query;
$countQuery->limit = 0;
return $this->nbResults = $this->findService->findNodes($countQuery)->totalCount;
} | Returns the number of results.
@return int The number of results | entailment |
public function getSlice($offset, $length)
{
$query = clone $this->query;
$query->offset = $offset;
$query->limit = $length;
$query->performCount = false;
$searchResult = $this->findService->findNodes($query);
// Set count for further use if returned by search engine despite !performCount (Solr, ES)
if (!isset($this->nbResults) && isset($searchResult->totalCount)) {
$this->nbResults = $searchResult->totalCount;
}
return $searchResult->searchHits;
} | Returns a slice of the results, as SearchHit objects.
@param int $offset The offset
@param int $length The length
@return \eZ\Publish\API\Repository\Values\Content\Search\SearchHit[] | entailment |
public function get_groups() {
$groups = array(
array(
'id' => 'a11y',
'name' => __( 'Accessibility', 'icon-picker' ),
),
array(
'id' => 'brand',
'name' => __( 'Brand', 'icon-picker' ),
),
array(
'id' => 'chart',
'name' => __( 'Charts', 'icon-picker' ),
),
array(
'id' => 'currency',
'name' => __( 'Currency', 'icon-picker' ),
),
array(
'id' => 'directional',
'name' => __( 'Directional', 'icon-picker' ),
),
array(
'id' => 'file-types',
'name' => __( 'File Types', 'icon-picker' ),
),
array(
'id' => 'form-control',
'name' => __( 'Form Controls', 'icon-picker' ),
),
array(
'id' => 'gender',
'name' => __( 'Genders', 'icon-picker' ),
),
array(
'id' => 'medical',
'name' => __( 'Medical', 'icon-picker' ),
),
array(
'id' => 'payment',
'name' => __( 'Payment', 'icon-picker' ),
),
array(
'id' => 'spinner',
'name' => __( 'Spinners', 'icon-picker' ),
),
array(
'id' => 'transportation',
'name' => __( 'Transportation', 'icon-picker' ),
),
array(
'id' => 'text-editor',
'name' => __( 'Text Editor', 'icon-picker' ),
),
array(
'id' => 'video-player',
'name' => __( 'Video Player', 'icon-picker' ),
),
array(
'id' => 'web-application',
'name' => __( 'Web Application', 'icon-picker' ),
),
);
/**
* Filter genericon groups
*
* @since 0.1.0
* @param array $groups Icon groups.
*/
$groups = apply_filters( 'icon_picker_fa_groups', $groups );
return $groups;
} | Get icon groups
@since 0.1.0
@return array | entailment |
public function get_items() {
$items = array(
/* Accessibility (a11y) */
array(
'group' => 'a11y',
'id' => ' fa-american-sign-language-interpreting',
'name' => __( 'American Sign Language', 'icon-picker' ),
),
array(
'group' => 'a11y',
'id' => ' fa-audio-description',
'name' => __( 'Audio Description', 'icon-picker' ),
),
array(
'group' => 'a11y',
'id' => ' fa-assistive-listening-systems',
'name' => __( 'Assistive Listening Systems', 'icon-picker' ),
),
array(
'group' => 'a11y',
'id' => 'fa-blind',
'name' => __( 'Blind', 'icon-picker' ),
),
array(
'group' => 'a11y',
'id' => 'fa-braille',
'name' => __( 'Braille', 'icon-picker' ),
),
array(
'group' => 'a11y',
'id' => 'fa-deaf',
'name' => __( 'Deaf', 'icon-picker' ),
),
array(
'group' => 'a11y',
'id' => 'fa-low-vision',
'name' => __( 'Low Vision', 'icon-picker' ),
),
array(
'group' => 'a11y',
'id' => 'fa-volume-control-phone',
'name' => __( 'Phone Volume Control', 'icon-picker' ),
),
array(
'group' => 'a11y',
'id' => 'fa-sign-language',
'name' => __( 'Sign Language', 'icon-picker' ),
),
array(
'group' => 'a11y',
'id' => 'fa-universal-access',
'name' => __( 'Universal Access', 'icon-picker' ),
),
/* Brand (brand) */
array(
'group' => 'brand',
'id' => 'fa-500px',
'name' => '500px',
),
array(
'group' => 'brand',
'id' => 'fa-adn',
'name' => 'ADN',
),
array(
'group' => 'brand',
'id' => 'fa-amazon',
'name' => 'Amazon',
),
array(
'group' => 'brand',
'id' => 'fa-android',
'name' => 'Android',
),
array(
'group' => 'brand',
'id' => 'fa-angellist',
'name' => 'AngelList',
),
array(
'group' => 'brand',
'id' => 'fa-apple',
'name' => 'Apple',
),
array(
'group' => 'brand',
'id' => 'fa-black-tie',
'name' => 'BlackTie',
),
array(
'group' => 'brand',
'id' => 'fa-bandcamp',
'name' => 'Bandcamp',
),
array(
'group' => 'brand',
'id' => 'fa-behance',
'name' => 'Behance',
),
array(
'group' => 'brand',
'id' => 'fa-behance-square',
'name' => 'Behance',
),
array(
'group' => 'brand',
'id' => 'fa-bitbucket',
'name' => 'Bitbucket',
),
array(
'group' => 'brand',
'id' => 'fa-bluetooth',
'name' => 'Bluetooth',
),
array(
'group' => 'brand',
'id' => 'fa-bluetooth-b',
'name' => 'Bluetooth',
),
array(
'group' => 'brand',
'id' => 'fa-bitbucket-square',
'name' => 'Bitbucket',
),
array(
'group' => 'brand',
'id' => 'fa-buysellads',
'name' => 'BuySellAds',
),
array(
'group' => 'brand',
'id' => 'fa-chrome',
'name' => 'Chrome',
),
array(
'group' => 'brand',
'id' => 'fa-codepen',
'name' => 'CodePen',
),
array(
'group' => 'brand',
'id' => 'fa-codiepie',
'name' => 'Codie Pie',
),
array(
'group' => 'brand',
'id' => 'fa-connectdevelop',
'name' => 'Connect + Develop',
),
array(
'group' => 'brand',
'id' => 'fa-contao',
'name' => 'Contao',
),
array(
'group' => 'brand',
'id' => 'fa-creative-commons',
'name' => 'Creative Commons',
),
array(
'group' => 'brand',
'id' => 'fa-css3',
'name' => 'CSS3',
),
array(
'group' => 'brand',
'id' => 'fa-dashcube',
'name' => 'Dashcube',
),
array(
'group' => 'brand',
'id' => 'fa-delicious',
'name' => 'Delicious',
),
array(
'group' => 'brand',
'id' => 'fa-deviantart',
'name' => 'deviantART',
),
array(
'group' => 'brand',
'id' => 'fa-digg',
'name' => 'Digg',
),
array(
'group' => 'brand',
'id' => 'fa-dribbble',
'name' => 'Dribbble',
),
array(
'group' => 'brand',
'id' => 'fa-dropbox',
'name' => 'DropBox',
),
array(
'group' => 'brand',
'id' => 'fa-drupal',
'name' => 'Drupal',
),
array(
'group' => 'brand',
'id' => 'fa-empire',
'name' => 'Empire',
),
array(
'group' => 'brand',
'id' => 'fa-edge',
'name' => 'Edge',
),
array(
'group' => 'brand',
'id' => 'fa-eercast',
'name' => 'eercast',
),
array(
'group' => 'brand',
'id' => 'fa-envira',
'name' => 'Envira',
),
array(
'group' => 'brand',
'id' => 'fa-etsy',
'name' => 'Etsy',
),
array(
'group' => 'brand',
'id' => 'fa-expeditedssl',
'name' => 'ExpeditedSSL',
),
array(
'group' => 'brand',
'id' => 'fa-facebook-official',
'name' => 'Facebook',
),
array(
'group' => 'brand',
'id' => 'fa-facebook-square',
'name' => 'Facebook',
),
array(
'group' => 'brand',
'id' => 'fa-facebook',
'name' => 'Facebook',
),
array(
'group' => 'brand',
'id' => 'fa-firefox',
'name' => 'Firefox',
),
array(
'group' => 'brand',
'id' => 'fa-flickr',
'name' => 'Flickr',
),
array(
'group' => 'brand',
'id' => 'fa-fonticons',
'name' => 'FontIcons',
),
array(
'group' => 'brand',
'id' => 'fa-fort-awesome',
'name' => 'Fort Awesome',
),
array(
'group' => 'brand',
'id' => 'fa-forumbee',
'name' => 'Forumbee',
),
array(
'group' => 'brand',
'id' => 'fa-foursquare',
'name' => 'Foursquare',
),
array(
'group' => 'brand',
'id' => 'fa-free-code-camp',
'name' => 'Free Code Camp',
),
array(
'group' => 'brand',
'id' => 'fa-get-pocket',
'name' => 'Pocket',
),
array(
'group' => 'brand',
'id' => 'fa-git',
'name' => 'Git',
),
array(
'group' => 'brand',
'id' => 'fa-git-square',
'name' => 'Git',
),
array(
'group' => 'brand',
'id' => 'fa-github',
'name' => 'GitHub',
),
array(
'group' => 'brand',
'id' => 'fa-gitlab',
'name' => 'Gitlab',
),
array(
'group' => 'brand',
'id' => 'fa-github-alt',
'name' => 'GitHub',
),
array(
'group' => 'brand',
'id' => 'fa-github-square',
'name' => 'GitHub',
),
array(
'group' => 'brand',
'id' => 'fa-gittip',
'name' => 'GitTip',
),
array(
'group' => 'brand',
'id' => 'fa-glide',
'name' => 'Glide',
),
array(
'group' => 'brand',
'id' => 'fa-glide-g',
'name' => 'Glide',
),
array(
'group' => 'brand',
'id' => 'fa-google',
'name' => 'Google',
),
array(
'group' => 'brand',
'id' => 'fa-google-plus',
'name' => 'Google+',
),
array(
'group' => 'brand',
'id' => 'fa-google-plus-square',
'name' => 'Google+',
),
array(
'group' => 'brand',
'id' => 'fa-grav',
'name' => 'Grav',
),
array(
'group' => 'brand',
'id' => 'fa-hacker-news',
'name' => 'Hacker News',
),
array(
'group' => 'brand',
'id' => 'fa-houzz',
'name' => 'Houzz',
),
array(
'group' => 'brand',
'id' => 'fa-html5',
'name' => 'HTML5',
),
array(
'group' => 'brand',
'id' => 'fa-imdb',
'name' => 'IMDb',
),
array(
'group' => 'brand',
'id' => 'fa-instagram',
'name' => 'Instagram',
),
array(
'group' => 'brand',
'id' => 'fa-internet-explorer',
'name' => 'Internet Explorer',
),
array(
'group' => 'brand',
'id' => 'fa-ioxhost',
'name' => 'IoxHost',
),
array(
'group' => 'brand',
'id' => 'fa-joomla',
'name' => 'Joomla',
),
array(
'group' => 'brand',
'id' => 'fa-jsfiddle',
'name' => 'JSFiddle',
),
array(
'group' => 'brand',
'id' => 'fa-lastfm',
'name' => 'Last.fm',
),
array(
'group' => 'brand',
'id' => 'fa-lastfm-square',
'name' => 'Last.fm',
),
array(
'group' => 'brand',
'id' => 'fa-leanpub',
'name' => 'Leanpub',
),
array(
'group' => 'brand',
'id' => 'fa-linkedin',
'name' => 'LinkedIn',
),
array(
'group' => 'brand',
'id' => 'fa-linkedin-square',
'name' => 'LinkedIn',
),
array(
'group' => 'brand',
'id' => 'fa-linode',
'name' => 'Linode',
),
array(
'group' => 'brand',
'id' => 'fa-linux',
'name' => 'Linux',
),
array(
'group' => 'brand',
'id' => 'fa-maxcdn',
'name' => 'MaxCDN',
),
array(
'group' => 'brand',
'id' => 'fa-meanpath',
'name' => 'meanpath',
),
array(
'group' => 'brand',
'id' => 'fa-medium',
'name' => 'Medium',
),
array(
'group' => 'brand',
'id' => 'fa-meetup',
'name' => 'Meetup',
),
array(
'group' => 'brand',
'id' => 'fa-mixcloud',
'name' => 'Mixcloud',
),
array(
'group' => 'brand',
'id' => 'fa-modx',
'name' => 'MODX',
),
array(
'group' => 'brand',
'id' => 'fa-odnoklassniki',
'name' => 'Odnoklassniki',
),
array(
'group' => 'brand',
'id' => 'fa-odnoklassniki-square',
'name' => 'Odnoklassniki',
),
array(
'group' => 'brand',
'id' => 'fa-opencart',
'name' => 'OpenCart',
),
array(
'group' => 'brand',
'id' => 'fa-openid',
'name' => 'OpenID',
),
array(
'group' => 'brand',
'id' => 'fa-opera',
'name' => 'Opera',
),
array(
'group' => 'brand',
'id' => 'fa-optin-monster',
'name' => 'OptinMonster',
),
array(
'group' => 'brand',
'id' => 'fa-pagelines',
'name' => 'Pagelines',
),
array(
'group' => 'brand',
'id' => 'fa-pied-piper',
'name' => 'Pied Piper',
),
array(
'group' => 'brand',
'id' => 'fa-pied-piper-alt',
'name' => 'Pied Piper',
),
array(
'group' => 'brand',
'id' => 'fa-pinterest',
'name' => 'Pinterest',
),
array(
'group' => 'brand',
'id' => 'fa-pinterest-p',
'name' => 'Pinterest',
),
array(
'group' => 'brand',
'id' => 'fa-pinterest-square',
'name' => 'Pinterest',
),
array(
'group' => 'brand',
'id' => 'fa-product-hunt',
'name' => 'Product Hunt',
),
array(
'group' => 'brand',
'id' => 'fa-quora',
'name' => 'Quora',
),
array(
'group' => 'brand',
'id' => 'fa-qq',
'name' => 'QQ',
),
array(
'group' => 'brand',
'id' => 'fa-reddit',
'name' => 'reddit',
),
array(
'group' => 'brand',
'id' => 'fa-ravelry',
'name' => 'Ravelry',
),
array(
'group' => 'brand',
'id' => 'fa-reddit-alien',
'name' => 'reddit',
),
array(
'group' => 'brand',
'id' => 'fa-reddit-square',
'name' => 'reddit',
),
array(
'group' => 'brand',
'id' => 'fa-renren',
'name' => 'Renren',
),
array(
'group' => 'brand',
'id' => 'fa-safari',
'name' => 'Safari',
),
array(
'group' => 'brand',
'id' => 'fa-scribd',
'name' => 'Scribd',
),
array(
'group' => 'brand',
'id' => 'fa-sellsy',
'name' => 'SELLSY',
),
array(
'group' => 'brand',
'id' => 'fa-shirtsinbulk',
'name' => 'Shirts In Bulk',
),
array(
'group' => 'brand',
'id' => 'fa-simplybuilt',
'name' => 'SimplyBuilt',
),
array(
'group' => 'brand',
'id' => 'fa-skyatlas',
'name' => 'Skyatlas',
),
array(
'group' => 'brand',
'id' => 'fa-skype',
'name' => 'Skype',
),
array(
'group' => 'brand',
'id' => 'fa-slack',
'name' => 'Slack',
),
array(
'group' => 'brand',
'id' => 'fa-slideshare',
'name' => 'SlideShare',
),
array(
'group' => 'brand',
'id' => 'fa-soundcloud',
'name' => 'SoundCloud',
),
array(
'group' => 'brand',
'id' => 'fa-snapchat',
'name' => 'Snapchat',
),
array(
'group' => 'brand',
'id' => 'fa-snapchat-ghost',
'name' => 'Snapchat',
),
array(
'group' => 'brand',
'id' => 'fa-snapchat-square',
'name' => 'Snapchat',
),
array(
'group' => 'brand',
'id' => 'fa-spotify',
'name' => 'Spotify',
),
array(
'group' => 'brand',
'id' => 'fa-stack-exchange',
'name' => 'Stack Exchange',
),
array(
'group' => 'brand',
'id' => 'fa-stack-overflow',
'name' => 'Stack Overflow',
),
array(
'group' => 'brand',
'id' => 'fa-steam',
'name' => 'Steam',
),
array(
'group' => 'brand',
'id' => 'fa-steam-square',
'name' => 'Steam',
),
array(
'group' => 'brand',
'id' => 'fa-stumbleupon',
'name' => 'StumbleUpon',
),
array(
'group' => 'brand',
'id' => 'fa-stumbleupon-circle',
'name' => 'StumbleUpon',
),
array(
'group' => 'brand',
'id' => 'fa-superpowers',
'name' => 'Superpowers',
),
array(
'group' => 'brand',
'id' => 'fa-telegram',
'name' => 'Telegram',
),
array(
'group' => 'brand',
'id' => 'fa-tencent-weibo',
'name' => 'Tencent Weibo',
),
array(
'group' => 'brand',
'id' => 'fa-trello',
'name' => 'Trello',
),
array(
'group' => 'brand',
'id' => 'fa-tripadvisor',
'name' => 'TripAdvisor',
),
array(
'group' => 'brand',
'id' => 'fa-tumblr',
'name' => 'Tumblr',
),
array(
'group' => 'brand',
'id' => 'fa-tumblr-square',
'name' => 'Tumblr',
),
array(
'group' => 'brand',
'id' => 'fa-twitch',
'name' => 'Twitch',
),
array(
'group' => 'brand',
'id' => 'fa-twitter',
'name' => 'Twitter',
),
array(
'group' => 'brand',
'id' => 'fa-twitter-square',
'name' => 'Twitter',
),
array(
'group' => 'brand',
'id' => 'fa-usb',
'name' => 'USB',
),
array(
'group' => 'brand',
'id' => 'fa-vimeo',
'name' => 'Vimeo',
),
array(
'group' => 'brand',
'id' => 'fa-viadeo',
'name' => 'Viadeo',
),
array(
'group' => 'brand',
'id' => 'fa-viadeo-square',
'name' => 'Viadeo',
),
array(
'group' => 'brand',
'id' => 'fa-vimeo-square',
'name' => 'Vimeo',
),
array(
'group' => 'brand',
'id' => 'fa-viacoin',
'name' => 'Viacoin',
),
array(
'group' => 'brand',
'id' => 'fa-vine',
'name' => 'Vine',
),
array(
'group' => 'brand',
'id' => 'fa-vk',
'name' => 'VK',
),
array(
'group' => 'brand',
'id' => 'fa-weixin',
'name' => 'Weixin',
),
array(
'group' => 'brand',
'id' => 'fa-weibo',
'name' => 'Wibo',
),
array(
'group' => 'brand',
'id' => 'fa-whatsapp',
'name' => 'WhatsApp',
),
array(
'group' => 'brand',
'id' => 'fa-wikipedia-w',
'name' => 'Wikipedia',
),
array(
'group' => 'brand',
'id' => 'fa-windows',
'name' => 'Windows',
),
array(
'group' => 'brand',
'id' => 'fa-wordpress',
'name' => 'WordPress',
),
array(
'group' => 'brand',
'id' => 'fa-wpbeginner',
'name' => 'WP Beginner',
),
array(
'group' => 'brand',
'id' => 'fa-wpexplorer',
'name' => 'WP Explorer',
),
array(
'group' => 'brand',
'id' => 'fa-wpforms',
'name' => 'WP Forms',
),
array(
'group' => 'brand',
'id' => 'fa-xing',
'name' => 'Xing',
),
array(
'group' => 'brand',
'id' => 'fa-xing-square',
'name' => 'Xing',
),
array(
'group' => 'brand',
'id' => 'fa-y-combinator',
'name' => 'Y Combinator',
),
array(
'group' => 'brand',
'id' => 'fa-yahoo',
'name' => 'Yahoo!',
),
array(
'group' => 'brand',
'id' => 'fa-yelp',
'name' => 'Yelp',
),
array(
'group' => 'brand',
'id' => 'fa-youtube',
'name' => 'YouTube',
),
array(
'group' => 'brand',
'id' => 'fa-youtube-square',
'name' => 'YouTube',
),
/* Chart (chart) */
array(
'group' => 'chart',
'id' => 'fa-area-chart',
'name' => __( 'Area Chart', 'icon-picker' ),
),
array(
'group' => 'chart',
'id' => 'fa-bar-chart-o',
'name' => __( 'Bar Chart', 'icon-picker' ),
),
array(
'group' => 'chart',
'id' => 'fa-line-chart',
'name' => __( 'Line Chart', 'icon-picker' ),
),
array(
'group' => 'chart',
'id' => 'fa-pie-chart',
'name' => __( 'Pie Chart', 'icon-picker' ),
),
/* Currency (currency) */
array(
'group' => 'currency',
'id' => 'fa-bitcoin',
'name' => __( 'Bitcoin', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-dollar',
'name' => __( 'Dollar', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-euro',
'name' => __( 'Euro', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-gbp',
'name' => __( 'GBP', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-gg',
'name' => __( 'GBP', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-gg-circle',
'name' => __( 'GG', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-ils',
'name' => __( 'Israeli Sheqel', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-money',
'name' => __( 'Money', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-rouble',
'name' => __( 'Rouble', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-inr',
'name' => __( 'Rupee', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-try',
'name' => __( 'Turkish Lira', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-krw',
'name' => __( 'Won', 'icon-picker' ),
),
array(
'group' => 'currency',
'id' => 'fa-jpy',
'name' => __( 'Yen', 'icon-picker' ),
),
/* Directional (directional) */
array(
'group' => 'directional',
'id' => 'fa-angle-down',
'name' => __( 'Angle Down', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-angle-left',
'name' => __( 'Angle Left', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-angle-right',
'name' => __( 'Angle Right', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-angle-up',
'name' => __( 'Angle Up', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-angle-double-down',
'name' => __( 'Angle Double Down', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-angle-double-left',
'name' => __( 'Angle Double Left', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-angle-double-right',
'name' => __( 'Angle Double Right', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-angle-double-up',
'name' => __( 'Angle Double Up', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-circle-o-down',
'name' => __( 'Arrow Circle Down', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-circle-o-left',
'name' => __( 'Arrow Circle Left', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-circle-o-right',
'name' => __( 'Arrow Circle Right', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-circle-o-up',
'name' => __( 'Arrow Circle Up', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-circle-down',
'name' => __( 'Arrow Circle Down', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-circle-left',
'name' => __( 'Arrow Circle Left', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-circle-right',
'name' => __( 'Arrow Circle Right', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-circle-up',
'name' => __( 'Arrow Circle Up', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-down',
'name' => __( 'Arrow Down', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-left',
'name' => __( 'Arrow Left', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-right',
'name' => __( 'Arrow Right', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrow-up',
'name' => __( 'Arrow Up', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrows',
'name' => __( 'Arrows', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrows-alt',
'name' => __( 'Arrows', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrows-h',
'name' => __( 'Arrows', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-arrows-v',
'name' => __( 'Arrows', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-caret-down',
'name' => __( 'Caret Down', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-caret-left',
'name' => __( 'Caret Left', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-caret-right',
'name' => __( 'Caret Right', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-caret-up',
'name' => __( 'Caret Up', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-caret-square-o-down',
'name' => __( 'Caret Down', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-caret-square-o-left',
'name' => __( 'Caret Left', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-caret-square-o-right',
'name' => __( 'Caret Right', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-caret-square-o-up',
'name' => __( 'Caret Up', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-chevron-circle-down',
'name' => __( 'Chevron Circle Down', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-chevron-circle-left',
'name' => __( 'Chevron Circle Left', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-chevron-circle-right',
'name' => __( 'Chevron Circle Right', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-chevron-circle-up',
'name' => __( 'Chevron Circle Up', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-chevron-down',
'name' => __( 'Chevron Down', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-chevron-left',
'name' => __( 'Chevron Left', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-chevron-right',
'name' => __( 'Chevron Right', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-chevron-up',
'name' => __( 'Chevron Up', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-hand-o-down',
'name' => __( 'Hand Down', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-hand-o-left',
'name' => __( 'Hand Left', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-hand-o-right',
'name' => __( 'Hand Right', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-hand-o-up',
'name' => __( 'Hand Up', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-long-arrow-down',
'name' => __( 'Long Arrow Down', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-long-arrow-left',
'name' => __( 'Long Arrow Left', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-long-arrow-right',
'name' => __( 'Long Arrow Right', 'icon-picker' ),
),
array(
'group' => 'directional',
'id' => 'fa-long-arrow-up',
'name' => __( 'Long Arrow Up', 'icon-picker' ),
),
/* File Types (file-types) */
array(
'group' => 'file-types',
'id' => 'fa-file',
'name' => __( 'File', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-o',
'name' => __( 'File', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-text',
'name' => __( 'File: Text', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-text-o',
'name' => __( 'File: Text', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-archive-o',
'name' => __( 'File: Archive', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-audio-o',
'name' => __( 'File: Audio', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-code-o',
'name' => __( 'File: Code', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-excel-o',
'name' => __( 'File: Excel', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-image-o',
'name' => __( 'File: Image', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-pdf-o',
'name' => __( 'File: PDF', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-powerpoint-o',
'name' => __( 'File: Powerpoint', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-video-o',
'name' => __( 'File: Video', 'icon-picker' ),
),
array(
'group' => 'file-types',
'id' => 'fa-file-word-o',
'name' => __( 'File: Word', 'icon-picker' ),
),
/* Form Control (form-control) */
array(
'group' => 'form-control',
'id' => 'fa-check-square',
'name' => __( 'Check', 'icon-picker' ),
),
array(
'group' => 'form-control',
'id' => 'fa-check-square-o',
'name' => __( 'Check', 'icon-picker' ),
),
array(
'group' => 'form-control',
'id' => 'fa-circle',
'name' => __( 'Circle', 'icon-picker' ),
),
array(
'group' => 'form-control',
'id' => 'fa-circle-o',
'name' => __( 'Circle', 'icon-picker' ),
),
array(
'group' => 'form-control',
'id' => 'fa-dot-circle-o',
'name' => __( 'Dot', 'icon-picker' ),
),
array(
'group' => 'form-control',
'id' => 'fa-minus-square',
'name' => __( 'Minus', 'icon-picker' ),
),
array(
'group' => 'form-control',
'id' => 'fa-minus-square-o',
'name' => __( 'Minus', 'icon-picker' ),
),
array(
'group' => 'form-control',
'id' => 'fa-plus-square',
'name' => __( 'Plus', 'icon-picker' ),
),
array(
'group' => 'form-control',
'id' => 'fa-plus-square-o',
'name' => __( 'Plus', 'icon-picker' ),
),
array(
'group' => 'form-control',
'id' => 'fa-square',
'name' => __( 'Square', 'icon-picker' ),
),
array(
'group' => 'form-control',
'id' => 'fa-square-o',
'name' => __( 'Square', 'icon-picker' ),
),
/* Gender (gender) */
array(
'group' => 'gender',
'id' => 'fa-genderless',
'name' => __( 'Genderless', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-mars',
'name' => __( 'Mars', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-mars-double',
'name' => __( 'Mars', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-mars-stroke',
'name' => __( 'Mars', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-mars-stroke-h',
'name' => __( 'Mars', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-mars-stroke-v',
'name' => __( 'Mars', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-mercury',
'name' => __( 'Mercury', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-neuter',
'name' => __( 'Neuter', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-transgender',
'name' => __( 'Transgender', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-transgender-alt',
'name' => __( 'Transgender', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-venus',
'name' => __( 'Venus', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-venus-double',
'name' => __( 'Venus', 'icon-picker' ),
),
array(
'group' => 'gender',
'id' => 'fa-venus-mars',
'name' => __( 'Venus + Mars', 'icon-picker' ),
),
/* Medical (medical) */
array(
'group' => 'medical',
'id' => 'fa-heart',
'name' => __( 'Heart', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-heart-o',
'name' => __( 'Heart', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-heartbeat',
'name' => __( 'Heartbeat', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-h-square',
'name' => __( 'Hospital', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-hospital-o',
'name' => __( 'Hospital', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-medkit',
'name' => __( 'Medkit', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-stethoscope',
'name' => __( 'Stethoscope', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-thermometer-empty',
'name' => __( 'Thermometer', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-thermometer-quarter',
'name' => __( 'Thermometer', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-thermometer-half',
'name' => __( 'Thermometer', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-thermometer-three-quarters',
'name' => __( 'Thermometer', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-thermometer-full',
'name' => __( 'Thermometer', 'icon-picker' ),
),
array(
'group' => 'medical',
'id' => 'fa-user-md',
'name' => __( 'User MD', 'icon-picker' ),
),
/* Payment (payment) */
array(
'group' => 'payment',
'id' => 'fa-cc-amex',
'name' => 'American Express',
),
array(
'group' => 'payment',
'id' => 'fa-credit-card',
'name' => __( 'Credit Card', 'icon-picker' ),
),
array(
'group' => 'payment',
'id' => 'fa-credit-card-alt',
'name' => __( 'Credit Card', 'icon-picker' ),
),
array(
'group' => 'payment',
'id' => 'fa-cc-diners-club',
'name' => 'Diners Club',
),
array(
'group' => 'payment',
'id' => 'fa-cc-discover',
'name' => 'Discover',
),
array(
'group' => 'payment',
'id' => 'fa-google-wallet',
'name' => 'Google Wallet',
),
array(
'group' => 'payment',
'id' => 'fa-cc-jcb',
'name' => 'JCB',
),
array(
'group' => 'payment',
'id' => 'fa-cc-mastercard',
'name' => 'MasterCard',
),
array(
'group' => 'payment',
'id' => 'fa-cc-paypal',
'name' => 'PayPal',
),
array(
'group' => 'payment',
'id' => 'fa-paypal',
'name' => 'PayPal',
),
array(
'group' => 'payment',
'id' => 'fa-cc-stripe',
'name' => 'Stripe',
),
array(
'group' => 'payment',
'id' => 'fa-cc-visa',
'name' => 'Visa',
),
/* Spinner (spinner) */
array(
'group' => 'spinner',
'id' => 'fa-circle-o-notch',
'name' => __( 'Circle', 'icon-picker' ),
),
array(
'group' => 'spinner',
'id' => 'fa-cog',
'name' => __( 'Cog', 'icon-picker' ),
),
array(
'group' => 'spinner',
'id' => 'fa-refresh',
'name' => __( 'Refresh', 'icon-picker' ),
),
array(
'group' => 'spinner',
'id' => 'fa-spinner',
'name' => __( 'Spinner', 'icon-picker' ),
),
/* Transportation (transportation) */
array(
'group' => 'transportation',
'id' => 'fa-ambulance',
'name' => __( 'Ambulance', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-bicycle',
'name' => __( 'Bicycle', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-bus',
'name' => __( 'Bus', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-car',
'name' => __( 'Car', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-fighter-jet',
'name' => __( 'Fighter Jet', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-motorcycle',
'name' => __( 'Motorcycle', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-plane',
'name' => __( 'Plane', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-rocket',
'name' => __( 'Rocket', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-ship',
'name' => __( 'Ship', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-space-shuttle',
'name' => __( 'Space Shuttle', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-subway',
'name' => __( 'Subway', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-taxi',
'name' => __( 'Taxi', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-train',
'name' => __( 'Train', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-truck',
'name' => __( 'Truck', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-wheelchair',
'name' => __( 'Wheelchair', 'icon-picker' ),
),
array(
'group' => 'transportation',
'id' => 'fa-wheelchair-alt',
'name' => __( 'Wheelchair', 'icon-picker' ),
),
/* Text Editor (text-editor) */
array(
'group' => 'text-editor',
'id' => 'fa-align-left',
'name' => __( 'Align Left', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-align-center',
'name' => __( 'Align Center', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-align-justify',
'name' => __( 'Justify', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-align-right',
'name' => __( 'Align Right', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-bold',
'name' => __( 'Bold', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-clipboard',
'name' => __( 'Clipboard', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-columns',
'name' => __( 'Columns', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-copy',
'name' => __( 'Copy', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-cut',
'name' => __( 'Cut', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-paste',
'name' => __( 'Paste', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-eraser',
'name' => __( 'Eraser', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-files-o',
'name' => __( 'Files', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-font',
'name' => __( 'Font', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-header',
'name' => __( 'Header', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-indent',
'name' => __( 'Indent', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-outdent',
'name' => __( 'Outdent', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-italic',
'name' => __( 'Italic', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-link',
'name' => __( 'Link', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-unlink',
'name' => __( 'Unlink', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-list',
'name' => __( 'List', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-list-alt',
'name' => __( 'List', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-list-ol',
'name' => __( 'Ordered List', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-list-ul',
'name' => __( 'Unordered List', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-paperclip',
'name' => __( 'Paperclip', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-paragraph',
'name' => __( 'Paragraph', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-repeat',
'name' => __( 'Repeat', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-undo',
'name' => __( 'Undo', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-save',
'name' => __( 'Save', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-strikethrough',
'name' => __( 'Strikethrough', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-subscript',
'name' => __( 'Subscript', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-superscript',
'name' => __( 'Superscript', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-table',
'name' => __( 'Table', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-text-height',
'name' => __( 'Text Height', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-text-width',
'name' => __( 'Text Width', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-th',
'name' => __( 'Table Header', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-th-large',
'name' => __( 'TH Large', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-th-list',
'name' => __( 'TH List', 'icon-picker' ),
),
array(
'group' => 'text-editor',
'id' => 'fa-underline',
'name' => __( 'Underline', 'icon-picker' ),
),
/* Video Player (video-player) */
array(
'group' => 'video-player',
'id' => 'fa-arrows-alt',
'name' => __( 'Arrows', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-backward',
'name' => __( 'Backward', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-compress',
'name' => __( 'Compress', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-eject',
'name' => __( 'Eject', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-expand',
'name' => __( 'Expand', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-fast-backward',
'name' => __( 'Fast Backward', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-fast-forward',
'name' => __( 'Fast Forward', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-forward',
'name' => __( 'Forward', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-pause',
'name' => __( 'Pause', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-pause-circle',
'name' => __( 'Pause', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-pause-circle-o',
'name' => __( 'Pause', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-play',
'name' => __( 'Play', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-play-circle',
'name' => __( 'Play', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-play-circle-o',
'name' => __( 'Play', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-step-backward',
'name' => __( 'Step Backward', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-step-forward',
'name' => __( 'Step Forward', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-stop',
'name' => __( 'Stop', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-stop-circle',
'name' => __( 'Stop', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-stop-circle-o',
'name' => __( 'Stop', 'icon-picker' ),
),
array(
'group' => 'video-player',
'id' => 'fa-youtube-play',
'name' => __( 'YouTube Play', 'icon-picker' ),
),
/* Web Application (web-application) */
array(
'group' => 'web-application',
'id' => 'fa-address-book',
'name' => __( 'Address Book', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-address-book-o',
'name' => __( 'Address Book', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-address-card',
'name' => __( 'Address Card', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-address-card-o',
'name' => __( 'Address Card', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-adjust',
'name' => __( 'Adjust', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-anchor',
'name' => __( 'Anchor', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-archive',
'name' => __( 'Archive', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-arrows',
'name' => __( 'Arrows', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-arrows-h',
'name' => __( 'Arrows', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-arrows-v',
'name' => __( 'Arrows', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-asterisk',
'name' => __( 'Asterisk', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-at',
'name' => __( 'At', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-balance-scale',
'name' => __( 'Balance', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-ban',
'name' => __( 'Ban', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-barcode',
'name' => __( 'Barcode', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bars',
'name' => __( 'Bars', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bathtub',
'name' => __( 'Bathtub', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-battery-empty',
'name' => __( 'Battery', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-battery-quarter',
'name' => __( 'Battery', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-battery-half',
'name' => __( 'Battery', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-battery-full',
'name' => __( 'Battery', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bed',
'name' => __( 'Bed', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-beer',
'name' => __( 'Beer', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bell',
'name' => __( 'Bell', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bell-o',
'name' => __( 'Bell', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bell-slash',
'name' => __( 'Bell', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bell-slash-o',
'name' => __( 'Bell', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-binoculars',
'name' => __( 'Binoculars', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-birthday-cake',
'name' => __( 'Birthday Cake', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bolt',
'name' => __( 'Bolt', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-book',
'name' => __( 'Book', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bookmark',
'name' => __( 'Bookmark', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bookmark-o',
'name' => __( 'Bookmark', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bomb',
'name' => __( 'Bomb', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-briefcase',
'name' => __( 'Briefcase', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bug',
'name' => __( 'Bug', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-building',
'name' => __( 'Building', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-building-o',
'name' => __( 'Building', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bullhorn',
'name' => __( 'Bullhorn', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-bullseye',
'name' => __( 'Bullseye', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-calculator',
'name' => __( 'Calculator', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-calendar',
'name' => __( 'Calendar', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-calendar-o',
'name' => __( 'Calendar', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-calendar-check-o',
'name' => __( 'Calendar', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-calendar-minus-o',
'name' => __( 'Calendar', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-calendar-times-o',
'name' => __( 'Calendar', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-camera',
'name' => __( 'Camera', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-camera-retro',
'name' => __( 'Camera Retro', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-caret-square-o-down',
'name' => __( 'Caret Down', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-caret-square-o-left',
'name' => __( 'Caret Left', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-caret-square-o-right',
'name' => __( 'Caret Right', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-caret-square-o-up',
'name' => __( 'Caret Up', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-cart-arrow-down',
'name' => __( 'Cart Arrow Down', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-cart-plus',
'name' => __( 'Cart Plus', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-certificate',
'name' => __( 'Certificate', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-check',
'name' => __( 'Check', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-check-circle',
'name' => __( 'Check', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-check-circle-o',
'name' => __( 'Check', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-child',
'name' => __( 'Child', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-circle-thin',
'name' => __( 'Circle', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-clock-o',
'name' => __( 'Clock', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-clone',
'name' => __( 'Clone', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-cloud',
'name' => __( 'Cloud', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-cloud-download',
'name' => __( 'Cloud Download', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-cloud-upload',
'name' => __( 'Cloud Upload', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-code',
'name' => __( 'Code', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-code-fork',
'name' => __( 'Code Fork', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-coffee',
'name' => __( 'Coffee', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-cogs',
'name' => __( 'Cogs', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-comment',
'name' => __( 'Comment', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-comment-o',
'name' => __( 'Comment', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-comments',
'name' => __( 'Comments', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-comments-o',
'name' => __( 'Comments', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-commenting',
'name' => __( 'Commenting', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-commenting-o',
'name' => __( 'Commenting', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-compass',
'name' => __( 'Compass', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-copyright',
'name' => __( 'Copyright', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-credit-card',
'name' => __( 'Credit Card', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-crop',
'name' => __( 'Crop', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-crosshairs',
'name' => __( 'Crosshairs', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-cube',
'name' => __( 'Cube', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-cubes',
'name' => __( 'Cubes', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-i-cursor',
'name' => __( 'Cursor', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-cutlery',
'name' => __( 'Cutlery', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-dashboard',
'name' => __( 'Dashboard', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-database',
'name' => __( 'Database', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-desktop',
'name' => __( 'Desktop', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-diamond',
'name' => __( 'Diamond', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-download',
'name' => __( 'Download', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-edit',
'name' => __( 'Edit', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-ellipsis-h',
'name' => __( 'Ellipsis', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-ellipsis-v',
'name' => __( 'Ellipsis', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-envelope',
'name' => __( 'Envelope', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-envelope-o',
'name' => __( 'Envelope', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-envelope-square',
'name' => __( 'Envelope', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-envelope-open',
'name' => __( 'Envelope', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-envelope-open-o',
'name' => __( 'Envelope', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-eraser',
'name' => __( 'Eraser', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-exchange',
'name' => __( 'Exchange', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-exclamation',
'name' => __( 'Exclamation', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-exclamation-circle',
'name' => __( 'Exclamation', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-exclamation-triangle',
'name' => __( 'Exclamation', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-external-link',
'name' => __( 'External Link', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-external-link-square',
'name' => __( 'External Link', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-eye',
'name' => __( 'Eye', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-eye-slash',
'name' => __( 'Eye', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-eyedropper',
'name' => __( 'Eye Dropper', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-fax',
'name' => __( 'Fax', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-female',
'name' => __( 'Female', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-film',
'name' => __( 'Film', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-filter',
'name' => __( 'Filter', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-fire',
'name' => __( 'Fire', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-fire-extinguisher',
'name' => __( 'Fire Extinguisher', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-flag',
'name' => __( 'Flag', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-flag-checkered',
'name' => __( 'Flag', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-flag-o',
'name' => __( 'Flag', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-flash',
'name' => __( 'Flash', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-flask',
'name' => __( 'Flask', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-folder',
'name' => __( 'Folder', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-folder-open',
'name' => __( 'Folder Open', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-folder-o',
'name' => __( 'Folder', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-folder-open-o',
'name' => __( 'Folder Open', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-futbol-o',
'name' => __( 'Foot Ball', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-frown-o',
'name' => __( 'Frown', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-gamepad',
'name' => __( 'Gamepad', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-gavel',
'name' => __( 'Gavel', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-gear',
'name' => __( 'Gear', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-gears',
'name' => __( 'Gears', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-gift',
'name' => __( 'Gift', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-glass',
'name' => __( 'Glass', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-globe',
'name' => __( 'Globe', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-graduation-cap',
'name' => __( 'Graduation Cap', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-group',
'name' => __( 'Group', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hand-lizard-o',
'name' => __( 'Hand', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-handshake-o',
'name' => __( 'Handshake', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hand-paper-o',
'name' => __( 'Hand', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hand-peace-o',
'name' => __( 'Hand', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hand-pointer-o',
'name' => __( 'Hand', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hand-rock-o',
'name' => __( 'Hand', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hand-scissors-o',
'name' => __( 'Hand', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hand-spock-o',
'name' => __( 'Hand', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hdd-o',
'name' => __( 'HDD', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hashtag',
'name' => __( 'Hash Tag', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-headphones',
'name' => __( 'Headphones', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-home',
'name' => __( 'Home', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hourglass-o',
'name' => __( 'Hourglass', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hourglass-start',
'name' => __( 'Hourglass', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hourglass-half',
'name' => __( 'Hourglass', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hourglass-end',
'name' => __( 'Hourglass', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-hourglass',
'name' => __( 'Hourglass', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-history',
'name' => __( 'History', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-inbox',
'name' => __( 'Inbox', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-id-badge',
'name' => __( 'ID Badge', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-id-card',
'name' => __( 'ID Card', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-id-card-o',
'name' => __( 'ID Card', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-industry',
'name' => __( 'Industry', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-info',
'name' => __( 'Info', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-info-circle',
'name' => __( 'Info', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-key',
'name' => __( 'Key', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-keyboard-o',
'name' => __( 'Keyboard', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-language',
'name' => __( 'Language', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-laptop',
'name' => __( 'Laptop', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-leaf',
'name' => __( 'Leaf', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-legal',
'name' => __( 'Legal', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-lemon-o',
'name' => __( 'Lemon', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-level-down',
'name' => __( 'Level Down', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-level-up',
'name' => __( 'Level Up', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-life-ring',
'name' => __( 'Life Buoy', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-lightbulb-o',
'name' => __( 'Lightbulb', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-location-arrow',
'name' => __( 'Location Arrow', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-lock',
'name' => __( 'Lock', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-magic',
'name' => __( 'Magic', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-magnet',
'name' => __( 'Magnet', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-mail-forward',
'name' => __( 'Mail Forward', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-mail-reply',
'name' => __( 'Mail Reply', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-mail-reply-all',
'name' => __( 'Mail Reply All', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-male',
'name' => __( 'Male', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-map',
'name' => __( 'Map', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-map-o',
'name' => __( 'Map', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-map-marker',
'name' => __( 'Map Marker', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-map-pin',
'name' => __( 'Map Pin', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-map-signs',
'name' => __( 'Map Signs', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-meh-o',
'name' => __( 'Meh', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-microchip',
'name' => __( 'Microchip', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-microphone',
'name' => __( 'Microphone', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-microphone-slash',
'name' => __( 'Microphone', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-minus',
'name' => __( 'Minus', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-minus-circle',
'name' => __( 'Minus', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-mobile',
'name' => __( 'Mobile', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-mobile-phone',
'name' => __( 'Mobile Phone', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-moon-o',
'name' => __( 'Moon', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-mouse-pointer',
'name' => __( 'Mouse Pointer', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-music',
'name' => __( 'Music', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-newspaper-o',
'name' => __( 'Newspaper', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-object-group',
'name' => __( 'Object Group', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-object-ungroup',
'name' => __( 'Object Ungroup', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-paint-brush',
'name' => __( 'Paint Brush', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-paper-plane',
'name' => __( 'Paper Plane', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-paper-plane-o',
'name' => __( 'Paper Plane', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-paw',
'name' => __( 'Paw', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-pencil',
'name' => __( 'Pencil', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-pencil-square',
'name' => __( 'Pencil', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-pencil-square-o',
'name' => __( 'Pencil', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-phone',
'name' => __( 'Phone', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-percent',
'name' => __( 'Percent', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-phone-square',
'name' => __( 'Phone', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-picture-o',
'name' => __( 'Picture', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-plug',
'name' => __( 'Plug', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-plus',
'name' => __( 'Plus', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-plus-circle',
'name' => __( 'Plus', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-power-off',
'name' => __( 'Power Off', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-podcast',
'name' => __( 'Podcast', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-print',
'name' => __( 'Print', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-puzzle-piece',
'name' => __( 'Puzzle Piece', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-qrcode',
'name' => __( 'QR Code', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-question',
'name' => __( 'Question', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-question-circle',
'name' => __( 'Question', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-question-circle-o',
'name' => __( 'Question', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-quote-left',
'name' => __( 'Quote Left', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-quote-right',
'name' => __( 'Quote Right', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-random',
'name' => __( 'Random', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-rebel',
'name' => __( 'Rebel', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-recycle',
'name' => __( 'Recycle', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-registered',
'name' => __( 'Registered', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-reply',
'name' => __( 'Reply', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-reply-all',
'name' => __( 'Reply All', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-retweet',
'name' => __( 'Retweet', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-road',
'name' => __( 'Road', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-rss',
'name' => __( 'RSS', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-rss-square',
'name' => __( 'RSS Square', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-search',
'name' => __( 'Search', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-search-minus',
'name' => __( 'Search Minus', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-search-plus',
'name' => __( 'Search Plus', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-server',
'name' => __( 'Server', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-share',
'name' => __( 'Share', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-share-alt',
'name' => __( 'Share', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-share-alt-square',
'name' => __( 'Share', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-share-square',
'name' => __( 'Share', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-share-square-o',
'name' => __( 'Share', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-shield',
'name' => __( 'Shield', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-shopping-cart',
'name' => __( 'Shopping Cart', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-shopping-bag',
'name' => __( 'Shopping Bag', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-shopping-basket',
'name' => __( 'Shopping Basket', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-shower',
'name' => __( 'Shower', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sign-in',
'name' => __( 'Sign In', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sign-out',
'name' => __( 'Sign Out', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-signal',
'name' => __( 'Signal', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sitemap',
'name' => __( 'Sitemap', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sliders',
'name' => __( 'Sliders', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-smile-o',
'name' => __( 'Smile', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-snowflake',
'name' => __( 'Snowflake', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sort',
'name' => __( 'Sort', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sort-asc',
'name' => __( 'Sort ASC', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sort-desc',
'name' => __( 'Sort DESC', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sort-down',
'name' => __( 'Sort Down', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sort-up',
'name' => __( 'Sort Up', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sort-alpha-asc',
'name' => __( 'Sort Alpha ASC', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sort-alpha-desc',
'name' => __( 'Sort Alpha DESC', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sort-amount-asc',
'name' => __( 'Sort Amount ASC', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sort-amount-desc',
'name' => __( 'Sort Amount DESC', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sort-numeric-asc',
'name' => __( 'Sort Numeric ASC', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sort-numeric-desc',
'name' => __( 'Sort Numeric DESC', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-spoon',
'name' => __( 'Spoon', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-star',
'name' => __( 'Star', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-star-half',
'name' => __( 'Star Half', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-star-half-o',
'name' => __( 'Star Half', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-star-half-empty',
'name' => __( 'Star Half Empty', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-star-half-full',
'name' => __( 'Star Half Full', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-star-o',
'name' => __( 'Star', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sticky-note',
'name' => __( 'Sticky Note', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sticky-note-o',
'name' => __( 'Sticky Note', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-street-view',
'name' => __( 'Street View', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-suitcase',
'name' => __( 'Suitcase', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-sun-o',
'name' => __( 'Sun', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-tablet',
'name' => __( 'Tablet', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-tachometer',
'name' => __( 'Tachometer', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-tag',
'name' => __( 'Tag', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-tags',
'name' => __( 'Tags', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-tasks',
'name' => __( 'Tasks', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-television',
'name' => __( 'Television', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-terminal',
'name' => __( 'Terminal', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-thumb-tack',
'name' => __( 'Thumb Tack', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-thumbs-down',
'name' => __( 'Thumbs Down', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-thumbs-up',
'name' => __( 'Thumbs Up', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-thumbs-o-down',
'name' => __( 'Thumbs Down', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-thumbs-o-up',
'name' => __( 'Thumbs Up', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-ticket',
'name' => __( 'Ticket', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-times',
'name' => __( 'Times', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-times-circle',
'name' => __( 'Times', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-times-circle-o',
'name' => __( 'Times', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-tint',
'name' => __( 'Tint', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-toggle-down',
'name' => __( 'Toggle Down', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-toggle-left',
'name' => __( 'Toggle Left', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-toggle-right',
'name' => __( 'Toggle Right', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-toggle-up',
'name' => __( 'Toggle Up', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-toggle-off',
'name' => __( 'Toggle Off', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-toggle-on',
'name' => __( 'Toggle On', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-trademark',
'name' => __( 'Trademark', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-trash',
'name' => __( 'Trash', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-trash-o',
'name' => __( 'Trash', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-tree',
'name' => __( 'Tree', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-trophy',
'name' => __( 'Trophy', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-tty',
'name' => __( 'TTY', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-umbrella',
'name' => __( 'Umbrella', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-university',
'name' => __( 'University', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-unlock',
'name' => __( 'Unlock', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-unlock-alt',
'name' => __( 'Unlock', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-unsorted',
'name' => __( 'Unsorted', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-upload',
'name' => __( 'Upload', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-user',
'name' => __( 'User', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-user-o',
'name' => __( 'User', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-user-circle',
'name' => __( 'User', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-user-circle-o',
'name' => __( 'User', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-users',
'name' => __( 'Users', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-user-plus',
'name' => __( 'User: Add', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-user-times',
'name' => __( 'User: Remove', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-user-secret',
'name' => __( 'User: Password', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-video-camera',
'name' => __( 'Video Camera', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-volume-down',
'name' => __( 'Volume Down', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-volume-off',
'name' => __( 'Volume Of', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-volume-up',
'name' => __( 'Volume Up', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-warning',
'name' => __( 'Warning', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-wifi',
'name' => __( 'WiFi', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-window-close',
'name' => __( 'Window Close', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-window-close-o',
'name' => __( 'Window Close', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-window-maximize',
'name' => __( 'Window Maximize', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-window-minimize',
'name' => __( 'Window Minimize', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-window-restore',
'name' => __( 'Window Restore', 'icon-picker' ),
),
array(
'group' => 'web-application',
'id' => 'fa-wrench',
'name' => __( 'Wrench', 'icon-picker' ),
),
);
/**
* Filter genericon items
*
* @since 0.1.0
* @param array $items Icon names.
*/
$items = apply_filters( 'icon_picker_fa_items', $items );
return $items;
} | Get icon names
@since 0.1.0
@return array | entailment |
public function get_stylesheet_uri() {
$stylesheet_uri = sprintf(
'%1$s/css/types/%2$s%3$s.css',
Icon_Picker::instance()->url,
$this->stylesheet_id,
( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'
);
/**
* Filters icon type's stylesheet URI
*
* @since 0.4.0
*
* @param string $stylesheet_uri Icon type's stylesheet URI.
* @param string $icon_type_id Icon type's ID.
* @param Icon_Picker_Type_Font $icon_type Icon type's instance.
*
* @return string
*/
$stylesheet_uri = apply_filters(
'icon_picker_icon_type_stylesheet_uri',
$stylesheet_uri,
$this->id,
$this
);
return $stylesheet_uri;
} | Get stylesheet URI
@since 0.1.0
@return string | entailment |
public function register_assets( Icon_Picker_Loader $loader ) {
if ( empty( $this->stylesheet_uri ) ) {
return;
}
$register = true;
$deps = false;
$styles = wp_styles();
/**
* When the stylesheet ID of an icon type is already registered,
* we'll compare its version with ours. If our stylesheet has greater
* version number, we'll deregister the other stylesheet.
*/
if ( $styles->query( $this->stylesheet_id, 'registered' ) ) {
$object = $styles->registered[ $this->stylesheet_id ];
if ( version_compare( $object->ver, $this->version, '<' ) ) {
$deps = $object->deps;
wp_deregister_style( $this->stylesheet_id );
} else {
$register = false;
}
}
if ( $register ) {
wp_register_style( $this->stylesheet_id, $this->stylesheet_uri, $deps, $this->version );
}
$loader->add_style( $this->stylesheet_id );
} | Register assets
@since 0.1.0
@wp_hook action icon_picker_loader_init
@param Icon_Picker_Loader $loader Icon_Picker_Loader instance.
@return void | entailment |
public function __isset($property)
{
switch ($property) {
case 'contentInfo':
case 'contentId':
case 'parent':
case 'content':
return true;
}
if (property_exists($this, $property) || property_exists($this->innerLocation, $property)) {
return true;
}
return parent::__isset($property);
} | Magic isset for signaling existence of convenience properties.
@param string $property
@return bool | entailment |
public function parse($definition)
{
$values = explode(' ', $definition);
$direction = $this->getDirection($values);
$values = explode('/', $values[0]);
$type = $values[0];
switch (strtolower($type)) {
case 'depth':
return new Depth($direction);
case 'field':
return $this->buildFieldSortClause($values, $direction);
case 'modified':
return new DateModified($direction);
case 'name':
return new ContentName($direction);
case 'priority':
return new Priority($direction);
case 'published':
return new DatePublished($direction);
}
throw new InvalidArgumentException(
"Could not handle sort type '{$type}'"
);
} | Return new sort clause instance by the given $definition string.
@throws \InvalidArgumentException
@param string $definition
@return \eZ\Publish\API\Repository\Values\Content\Query\SortClause | entailment |
private function buildFieldSortClause(array $values, $direction)
{
if (!array_key_exists(1, $values)) {
throw new InvalidArgumentException(
'Field sort clause requires ContentType identifier'
);
}
if (!array_key_exists(2, $values)) {
throw new InvalidArgumentException(
'Field sort clause requires FieldDefinition identifier'
);
}
return new Field($values[1], $values[2], $direction);
} | Build a new Field sort clause from the given arguments.
@throws \InvalidArgumentException
@param array $values
@param mixed $direction
@return \eZ\Publish\API\Repository\Values\Content\Query\SortClause\Field | entailment |
private function getDirection(array $values)
{
$direction = 'asc';
if (array_key_exists(1, $values)) {
$direction = $values[1];
}
switch (strtolower($direction)) {
case 'asc':
return Query::SORT_ASC;
case 'desc':
return Query::SORT_DESC;
}
throw new InvalidArgumentException(
"Could not handle sort direction '{$direction}'"
);
} | Resolve direction constant value from the given array of $values.
@throws \InvalidArgumentException
@param string[] $values
@return mixed | entailment |
private function registerResolver(Definition $resolverRegistryDefinition, $id, array $attributes)
{
foreach ($attributes as $attribute) {
if (!isset($attribute['identifier'])) {
throw new LogicException(
"'{$this->resolverTag}' service tag needs an 'identifier' attribute to identify the field type"
);
}
$resolverRegistryDefinition->addMethodCall(
'register',
[
$attribute['identifier'],
new Reference($id),
]
);
}
} | Add method call to register resolver with given $id with resolver registry.
@throws \LogicException
@param \Symfony\Component\DependencyInjection\Definition $resolverRegistryDefinition
@param string $id
@param array $attributes | entailment |
private function getSiteLocation(APILocation $location)
{
$versionInfo = $this->contentService->loadVersionInfoById($location->contentInfo->id);
$languageCode = $this->getLanguage(
$versionInfo->languageCodes,
$versionInfo->contentInfo->mainLanguageCode,
$versionInfo->contentInfo->alwaysAvailable
);
if ($languageCode === null) {
throw new TranslationNotMatchedException(
$versionInfo->contentInfo->id,
$this->getContext($versionInfo)
);
}
return $this->domainObjectMapper->mapLocation($location, $versionInfo, $languageCode);
} | Returns Site Location object for the given Repository $location.
@throws \Netgen\EzPlatformSiteApi\Core\Site\Exceptions\TranslationNotMatchedException
@param \eZ\Publish\API\Repository\Values\Content\Location $location
@return \Netgen\EzPlatformSiteApi\API\Values\Location | entailment |
private function getSiteNode(APILocation $location)
{
$versionInfo = $this->contentService->loadVersionInfoById($location->contentInfo->id);
$languageCode = $this->getLanguage(
$versionInfo->languageCodes,
$versionInfo->contentInfo->mainLanguageCode,
$versionInfo->contentInfo->alwaysAvailable
);
if ($languageCode === null) {
throw new TranslationNotMatchedException(
$versionInfo->contentInfo->id,
$this->getContext($versionInfo)
);
}
return $this->domainObjectMapper->mapNode(
$location,
$this->contentService->loadContent(
$location->contentInfo->id,
[$languageCode],
$location->contentInfo->currentVersionNo
),
$languageCode
);
} | Returns Site Node object for the given Repository $location.
@throws \Netgen\EzPlatformSiteApi\Core\Site\Exceptions\TranslationNotMatchedException
@param \eZ\Publish\API\Repository\Values\Content\Location $location
@return \Netgen\EzPlatformSiteApi\API\Values\Node | entailment |
private function getLanguage(array $languageCodes, $mainLanguageCode, $alwaysAvailable)
{
$languageCodesSet = array_flip($languageCodes);
foreach ($this->settings->prioritizedLanguages as $languageCode) {
if (isset($languageCodesSet[$languageCode])) {
return $languageCode;
}
}
if ($this->settings->useAlwaysAvailable && $alwaysAvailable) {
return $mainLanguageCode;
}
return null;
} | Returns the most prioritized language for the given parameters.
Will return null if language could not be resolved.
@param string[] $languageCodes
@param string $mainLanguageCode
@param bool $alwaysAvailable
@return string|null | entailment |
private function getContext(VersionInfo $versionInfo)
{
return [
'prioritizedLanguages' => $this->settings->prioritizedLanguages,
'useAlwaysAvailable' => $this->settings->useAlwaysAvailable,
'availableTranslations' => $versionInfo->languageCodes,
'mainTranslation' => $versionInfo->contentInfo->mainLanguageCode,
'alwaysAvailable' => $versionInfo->contentInfo->alwaysAvailable,
];
} | Returns an array describing language resolving context.
To be used when throwing TranslationNotMatchedException.
@param \eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo
@return array | entailment |
public function createEvent(
$event,
$entityType,
$entityId,
$targetEntityType=null,
$targetEntityId=null,
array $properties=null,
$eventTime=null
) {
if (!isset($eventTime)) {
$eventTime = new \DateTime();
} elseif (!($eventTime instanceof \DateTime)) {
$eventTime = new \DateTime($eventTime);
}
$eventTime = $eventTime->format(\DateTime::ISO8601);
$data = [
'event' => $event,
'entityType' => $entityType,
'entityId' => $entityId,
'eventTime' => $eventTime,
];
if (isset($targetEntityType)) {
$data['targetEntityType'] = $targetEntityType;
}
if (isset($targetEntityId)) {
$data['targetEntityId'] = $targetEntityId;
}
if (isset($properties)) {
$data['properties'] = $properties;
}
$json = $this->jsonEncode($data);
$this->export($json);
} | Create and export a json-encoded event.
@see \predictionio\EventClient::CreateEvent()
@param $event
@param $entityType
@param $entityId
@param null $targetEntityType
@param null $targetEntityId
@param array $properties
@param $eventTime | entailment |
public function build_signature($request, $consumer, $token) {
$key_parts = array(
$consumer->secret,
($token) ? $token->secret : ""
);
$key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
$key = implode('&', $key_parts);
$request->base_string = $key;
return $key;
} | oauth_signature is set to the concatenated encoded values of the Consumer Secret and
Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
empty. The result MUST be encoded again.
- Chapter 9.4.1 ("Generating Signatures")
Please note that the second encoding MUST NOT happen in the SignatureMethod, as
OAuthRequest handles this! | entailment |
public function createDictionary($entityId, $matchType = null, $caseInsensitive = null, $language = null)
{
$request = [];
if ( ! is_string($entityId)) {
throw new Exception('TextRazor Error: Custom Entity Dictionaries must have an ID.');
}
if (isset($matchType)) {
$request['matchType'] = $matchType;
}
if (isset($caseInsensitive)) {
$request['caseInsensitive'] = $caseInsensitive;
}
if (isset($language)) {
$request['language'] = $language;
}
$encodedRequest = empty($request) ? '{}' : json_encode($request);
return $this->sendRequest($encodedRequest, '/entities/' . $entityId, 'PUT');
} | Creates a new dictionary using properties provided in the dict $dictionaryProperties.
See the properties of class Dictionary for valid options.
@param $entityId
@param null $matchType
@param null $caseInsensitive
@param null $language
@return mixed
@throws \Exception | entailment |
protected function createCookieDriver()
{
$determiner = new Determiners\Cookie(
$this->app['config']['localize-middleware']['cookie']
);
$determiner->setFallback($this->app['config']['app']['fallback_locale']);
return $determiner;
} | Get a cookie determiner instance.
@return \BenConstable\Localize\Determiners\Cookie | entailment |
protected function createHostDriver()
{
$determiner = new Determiners\Host(
new Collection($this->app['config']['localize-middleware']['hosts'])
);
$determiner->setFallback($this->app['config']['app']['fallback_locale']);
return $determiner;
} | Get a host determiner instance.
@return \BenConstable\Localize\Determiners\Host | entailment |
protected function createParameterDriver()
{
$determiner = new Determiners\Parameter(
$this->app['config']['localize-middleware']['parameter']
);
$determiner->setFallback($this->app['config']['app']['fallback_locale']);
return $determiner;
} | Get a parameter determiner instance.
@return \BenConstable\Localize\Determiners\Parameter | entailment |
protected function createHeaderDriver()
{
$determiner = new Determiners\Header(
$this->app['config']['localize-middleware']['header']
);
$determiner->setFallback($this->app['config']['app']['fallback_locale']);
return $determiner;
} | Get a header determiner instance.
@return \BenConstable\Localize\Determiners\Header | entailment |
protected function createSessionDriver()
{
$determiner = new Determiners\Session(
$this->app['config']['localize-middleware']['session']
);
$determiner->setFallback($this->app['config']['app']['fallback_locale']);
return $determiner;
} | Get a session determiner instance.
@return \BenConstable\Localize\Determiners\Session | entailment |
protected function createStackDriver()
{
$determiners = (new Collection((array) $this->app['config']['localize-middleware']['driver']))
->filter(function ($driver) {
return $driver !== 'stack';
})
->map(function ($driver) {
return $this->driver($driver)->setFallback(null);
});
return (new Determiners\Stack($determiners))
->setFallback($this->app['config']['app']['fallback_locale']);
} | Get a stack determiner instance.
@return \BenConstable\Localize\Determiners\Stack | entailment |
public function _set($name, $value)
{
$setMethod = 'set' . ucfirst($name);
if (method_exists($this, $setMethod)) {
$this->$setMethod($value);
} else {
throw new \InvalidArgumentException(sprintf('Setter does not exist for "%s" property', $name));
}
return $this;
} | Generic method setting value
@throws \InvalidArgumentException
@param string $name property name to set
@param mixed $value property value to use
@return self | entailment |
public function _get($name)
{
$getMethod = 'get' . ucfirst($name);
if (method_exists($this, $getMethod)) {
return $this->$getMethod();
}
throw new \InvalidArgumentException(sprintf('Getter does not exist for "%s" property', $name));
} | Generic method getting value
@throws \InvalidArgumentException
@param string $name property name to get
@return mixed | entailment |
public static function findByName(string $name, $guardName = null): PermissionContract
{
$guardName = $guardName ?? Guard::getDefaultName(static::class);
$permission = static::getPermissions()->where('name', $name)->where('guard_name', $guardName)->first();
if (! $permission) {
throw PermissionDoesNotExist::create($name, $guardName);
}
return $permission;
} | Find a permission by its name (and optionally guardName).
@param string $name
@param string|null $guardName
@throws \Konekt\Acl\Exceptions\PermissionDoesNotExist
@return \Konekt\Acl\Contracts\Permission | entailment |
public function scopeRole(Builder $query, $roles): Builder
{
if ($roles instanceof Collection) {
$roles = $roles->all();
}
if (! is_array($roles)) {
$roles = [$roles];
}
$roles = array_map(function ($role) {
if ($role instanceof Role) {
return $role;
}
return RoleProxy::findByName($role, $this->getDefaultGuardName());
}, $roles);
return $query->whereHas('roles', function ($query) use ($roles) {
$query->where(function ($query) use ($roles) {
foreach ($roles as $role) {
$query->orWhere('roles.id', $role->id);
}
});
});
} | Scope the model query to certain roles only.
@param \Illuminate\Database\Eloquent\Builder $query
@param string|array|Role|\Illuminate\Support\Collection $roles
@return \Illuminate\Database\Eloquent\Builder | entailment |
protected function convertToPermissionModels($permissions): array
{
if ($permissions instanceof Collection) {
$permissions = $permissions->all();
}
$permissions = array_wrap($permissions);
return array_map(function ($permission) {
if ($permission instanceof Permission) {
return $permission;
}
return app(Permission::class)->findByName($permission, $this->getDefaultGuardName());
}, $permissions);
} | @param string|array|\Spatie\Permission\Contracts\Permission|\Illuminate\Support\Collection $permissions
@return array | entailment |
public function assignRole(...$roles)
{
$roles = collect($roles)
->flatten()
->map(function ($role) {
return $this->getStoredRole($role);
})
->each(function ($role) {
$this->ensureModelSharesGuard($role);
})
->all();
$this->roles()->saveMany($roles);
$this->forgetCachedPermissions();
return $this;
} | Assign the given role to the model.
@param array|string|\Konekt\Acl\Contracts\Role ...$roles
@return $this | entailment |
public function hasRole($roles): bool
{
if (is_string($roles) && false !== strpos($roles, '|')) {
$roles = $this->convertPipeToArray($roles);
}
if (is_string($roles)) {
return $this->roles->contains('name', $roles);
}
if ($roles instanceof Role) {
return $this->roles->contains('id', $roles->id);
}
if (is_array($roles)) {
foreach ($roles as $role) {
if ($this->hasRole($role)) {
return true;
}
}
return false;
}
return $roles->intersect($this->roles)->isNotEmpty();
} | Determine if the model has (one of) the given role(s).
@param string|array|\Konekt\Acl\Contracts\Role|\Illuminate\Support\Collection $roles
@return bool | entailment |
public function hasAllRoles($roles): bool
{
if (is_string($roles) && false !== strpos($roles, '|')) {
$roles = $this->convertPipeToArray($roles);
}
if (is_string($roles)) {
return $this->roles->contains('name', $roles);
}
if ($roles instanceof Role) {
return $this->roles->contains('id', $roles->id);
}
$roles = collect()->make($roles)->map(function ($role) {
return $role instanceof Role ? $role->name : $role;
});
return $roles->intersect($this->roles->pluck('name')) == $roles;
} | Determine if the model has all of the given role(s).
@param string|array|\Konekt\Acl\Contracts\Role|\Illuminate\Support\Collection $roles
@return bool | entailment |
public function hasPermissionTo($permission, $guardName = null): bool
{
if (is_string($permission)) {
$permission = PermissionProxy::findByName(
$permission,
$guardName ?? $this->getDefaultGuardName()
);
}
return $this->hasDirectPermission($permission) || $this->hasPermissionViaRole($permission);
} | Determine if the model may perform the given permission.
@param string|\Konekt\Acl\Contracts\Permission $permission
@param string|null $guardName
@return bool | entailment |
public function hasDirectPermission($permission): bool
{
if (is_string($permission)) {
$permission = PermissionProxy::findByName($permission, $this->getDefaultGuardName());
if (! $permission) {
return false;
}
}
return $this->permissions->contains('id', $permission->id);
} | Determine if the model has the given permission.
@param string|\Konekt\Acl\Contracts\Permission $permission
@return bool | entailment |
public function get($key)
{
$env = $this->parseFile();
$result = $env->filter(function (Collection $value) use ($key) {
return $value->first() == $key;
})->first();
return $result instanceof Collection ? $result->get(1) : $result;
} | Get an entry from the .env file by key.
@param string $key
@return string | entailment |
public function set($key, $value, $linebreak = false)
{
$oldValue = $this->get($key);
if (! preg_match('/\d/', $value) || preg_match('/=/', $value)) {
$value = "\"$value\"";
}
$new = $linebreak ? "\n$key=$value" : "$key=$value";
if (! is_null($oldValue)) {
return $this->replaceInFile("$key=$oldValue", $new);
}
file_put_contents($this->getPath(), "\n$new", FILE_APPEND);
return $this;
} | Set the value of the given key to the value supplied.
@param string $key
@param string $value
@param bool $linebreak
@return \Sven\FlexEnv\Env | entailment |
public function all()
{
$env = $this->parseFile();
$result = [];
$env->each(function (Collection $value) use (&$result) {
return $result[$value->first()] = $value->get(1);
});
return $result;
} | Gets all the key/value pairs from the .env file.
@return array | entailment |
private function parseFile()
{
$contents = file_get_contents($this->getPath());
$lines = new Collection(explode("\n", $contents));
$result = new Collection();
$lines->filter(function ($value) {
return $value;
})->each(function ($value) use ($result) {
preg_match('/([a-zA-Z_-]+)\=(.+)/', $value, $regexResult);
array_shift($regexResult);
$result->push(new Collection($regexResult));
});
return $result;
} | Parse the .env file contents for easier handling.
@return \Illuminate\Support\Collection | entailment |
public function replaceInFile($old, $new, $append = 0)
{
$contents = $this->previous;
$replaceWith = preg_replace("~$old\n?~", "$new\n", $contents);
file_put_contents($this->getPath(), $replaceWith, $append);
return $this;
} | Replace a part of the .env file.
@param string $old
@param string $new
@param int $append
@return \Sven\FlexEnv\Env | entailment |
public function handle()
{
$env = new Env(base_path('.env'));
$key = strtoupper($this->argument('key'));
$result = str_replace('"', '', $env->get($key));
if ($result == '' || is_null($result)) {
return $this->error("Could not find a value for [$key] in your .env file.");
}
return $this->comment("The value for [$key] is \"$result\".");
} | Execute the console command.
@return void | entailment |
public function givePermissionTo(...$permissions)
{
$permissions = collect($permissions)
->flatten()
->map(function ($permission) {
return $this->getStoredPermission($permission);
})
->each(function ($permission) {
$this->ensureModelSharesGuard($permission);
})
->all();
$this->permissions()->saveMany($permissions);
$this->forgetCachedPermissions();
return $this;
} | Grant the given permission(s) to a role.
@param string|array|\Konekt\Acl\Contracts\Permission|\Illuminate\Support\Collection $permissions
@return $this | entailment |
public function revokePermissionTo($permission)
{
$this->permissions()->detach($this->getStoredPermission($permission));
$this->forgetCachedPermissions();
return $this;
} | Revoke the given permission.
@param \Konekt\Acl\Contracts\Permission|\Konekt\Acl\Contracts\Permission[]|string|string[] $permission
@return $this | entailment |
protected function getStoredPermission($permissions)
{
if (is_string($permissions)) {
return PermissionProxy::findByName($permissions, $this->getDefaultGuardName());
}
if (is_array($permissions)) {
return PermissionProxy::whereIn('name', $permissions)
->whereIn('guard_name', $this->getGuardNames())
->get();
}
return $permissions;
} | @param string|array|\Konekt\Acl\Contracts\Permission|\Illuminate\Support\Collection $permissions
@return \Konekt\Acl\Contracts\Permission|\Konekt\Acl\Contracts\Permission|\Illuminate\Support\Collection | entailment |
public function determineLocale(Request $request)
{
return $request->session()->get($this->sessionKey, $this->fallback);
} | Determine the locale from the session.
@param \Illuminate\Http\Request $request
@return string | entailment |
public function determineLocale(Request $request)
{
$locale = $this->determiners
->map(function ($determiner) use ($request) {
return $determiner->determineLocale($request);
})
->filter()
->first();
return $locale ?: $this->fallback;
} | Determine the locale from the underlying determiner stack.
@param \Illuminate\Http\Request $request
@return string|null | entailment |
static function clear() {
if ( empty(self::$_cache) || DEBUGKEEPTEMP ) return;
foreach ( self::$_cache as $file ) {
if (DEBUGPNG) print "[clear unlink $file]";
unlink($file);
}
} | Unlink all cached images (i.e. temporary images either downloaded
or converted) | entailment |
public function getLogsFromCurrentFile()
{
if ($this->currentFile === null) {
return [];
}
if (File::size($this->currentFile) > $this->maxFileSize) {
return;
}
$datePattern = '\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}';
$pattern = "/\\[$datePattern\\].*/";
$fileContent = File::get($this->currentFile);
preg_match_all($pattern, $fileContent, $rows);
if (!is_array($rows) || count($rows) === 0) {
return [];
}
$rows = $rows[0];
$logs = [];
foreach ($rows as $row) {
preg_match(
"/^\\[($datePattern)\\].*?(\\w+)\\."
. '([A-Z]+): (.*?)( in .*?:[0-9]+)?$/',
$row,
$matches
);
if (!isset($matches[4])) {
continue;
}
$level = Str::lower($matches[3]);
$inFile = null;
if (isset($matches[5])) {
$inFile = substr($matches[5], 4);
}
$logs[] = (object) [
'context' => $matches[2],
'level' => $level,
'levelClass' => static::$levelsClasses[$level],
'levelImg' => static::$levelsImgs[$level],
'date' => $matches[1],
'text' => trim($matches[4]),
'inFile' => $inFile,
];
}
return array_reverse($logs);
} | Returns logs from current file.
@return array|null | entailment |
public function getCurrentDirectoryContent()
{
$content = File::glob($this->currentDir . DIRECTORY_SEPARATOR . '*');
$content = array_map(function ($item) {
return (object) [
'path' => $this->getPathRelativeToBaseDir($item),
'name' => Str::substr(
$item,
Str::length($this->currentDir) + 1
),
'isFile' => File::isFile($item),
'isDir' => File::isDirectory($item),
];
}, $content);
return $content;
} | Returns content (files and folders) of current folder.
@return array | entailment |
public function setCurrentDirectory($directory)
{
$directory = $this->normalizePath("$this->baseDir/$directory");
$this->checkIfPathInBaseDir($directory);
$this->currentDir = $directory;
return $this;
} | @param string $directory Relative path to directory from base path.
@throws InvalidArgumentException
@return $this | entailment |
public function setCurrentFile($file)
{
$file = $this->normalizePath("$this->baseDir/$file");
$this->checkIfPathInBaseDir($file);
$this->currentFile = $file;
$dir = File::dirname($file);
$this->currentDir = $dir;
return $this;
} | @param string $file Relative path to file from base directory.
@throws InvalidArgumentException
@return $this | entailment |
public function getRelativePathToCurrentDirectoryParent()
{
if ($this->baseDir === $this->currentDir) {
return DIRECTORY_SEPARATOR;
}
$path = realpath($this->currentDir . DIRECTORY_SEPARATOR . '..');
return $this->getPathRelativeToBaseDir($path) ?: DIRECTORY_SEPARATOR;
} | Returns path to parent of current directory.
@return string | entailment |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.