public function Micon::getInfo in Micon 2.x
Same name in this branch
- 2.x src/Element/Micon.php \Drupal\micon\Element\Micon::getInfo()
- 2.x src/Entity/Micon.php \Drupal\micon\Entity\Micon::getInfo()
Same name and namespace in other branches
- 8 src/Entity/Micon.php \Drupal\micon\Entity\Micon::getInfo()
Get Micon package information.
Return value
array The information for the IcoMoon package.
Overrides MiconInterface::getInfo
3 calls to Micon::getInfo()
- Micon::getIcons in src/
Entity/ Micon.php - Get Micon package icons with tag as key.
- Micon::getName in src/
Entity/ Micon.php - Get unique IcoMoon package name.
- Micon::getPrefix in src/
Entity/ Micon.php - Get unique IcoMoon package prefix.
File
- src/
Entity/ Micon.php, line 121
Class
- Micon
- Defines the Micon entity.
Namespace
Drupal\micon\EntityCode
public function getInfo() {
if (empty($this->info)) {
$this->info = [];
$path = $this
->getDirectory() . '/selection.json';
if (file_exists($path)) {
$data = file_get_contents($path);
$this->info = Json::decode($data);
}
}
return $this->info;
}