I developed one Joomla Component. In Administrator Part I display Dynamic Category using helper/select.php
file. But I got this error:
Strict Standards: Non-static method
TrueMatrimonyHelperSelect::getProfileforlist()
should not be called statically, assuming$this
from incompatible context
XML Code:
<field name="createby" type="list" id="createby"
source_file="admin://components/com_astrimony/helpers/select.php"
source_class="TrueMatrimonyHelperSelect" source_method="getProfileforlist"
sortable="true" tdwidth="15%" show_link="true" url="index.php?option=astrimony&view=profile&id=[ITEM:ID]"
label="COM_MATRIMONY_REGISTER_FOR"
/>
Select File Code
public function getProfileforlist($name='', $attr=array(), $selected_value='', $id='') {
$items = FOFModel::getTmpInstance('Profilerefers', 'TrueMatrimonyModel')->enabled(1)->getList(true);
$result = array();
$result[] = JHtml::_('select.option','',JText::_('COM_TRUEMATRIMONY_SELECT_PROFILE_FOR'));
foreach($items as $item) {
$result[$item->profilerefer_id] = $item->profile_reference;
} //print_r($result);exit;
return $result;
}
</div>