Add reference layer.

This commit is contained in:
David Molineus
2015-01-09 15:24:34 +01:00
parent efb36256c7
commit 8e35dc1fef
15 changed files with 149 additions and 24 deletions

View File

@@ -57,6 +57,10 @@ class Layer
$icon = \Image::getHtml($src, $alt, sprintf('title="%s"', strip_tags($alt)));
if (!empty($this->layers[$row['type']]['label'])) {
$label = $this->layers[$row['type']]['label']($row, $label);
}
return $icon . ' ' . $label;
}
@@ -146,6 +150,15 @@ class Layer
return $this->generateButton($row, $href, $label, $title, $icon, $attributes);
}
public function getLayers($dataContainer)
{
$collection = LayerModel::findBy('id !', $dataContainer->id);
return OptionsBuilder::fromCollection($collection, 'id', 'title')
->asTree()
->getOptions();
}
/**
* @param $row
* @param $href