public function getJsonLabels()
{
$labels = $this->getAllLabels();
$output = array();
foreach ($labels as $label) {
$output[$label->id] = array('id' => (int) $label->id, 'fieldId' => (int) $label->fieldId, 'fieldLayoutId' => (int) $label->fieldLayoutId, 'template' => Craft::t($label->template));
}
return $output;
}