Skip to content

Instantly share code, notes, and snippets.

@phalcon
Last active December 10, 2015 12:48
Show Gist options
  • Save phalcon/4437009 to your computer and use it in GitHub Desktop.
Save phalcon/4437009 to your computer and use it in GitHub Desktop.
<?php
$robots = new Robots();
$modelsManager = $di->get('modelsManager');
$relations = $modelsManager->getRelations('Robots');
foreach ($relations as $relation) {
$options = $relation->getOptions();
if (isset($options['alias'])) {
echo $alias = $options['alias'];
} else {
echo 'no alias', PHP_EOL;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment