Skip to content

Instantly share code, notes, and snippets.

@kilica
Last active May 3, 2019 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kilica/53875988de9ffa2f2c3481d27c8db8b4 to your computer and use it in GitHub Desktop.
Save kilica/53875988de9ffa2f2c3481d27c8db8b4 to your computer and use it in GitHub Desktop.
function smarty_function_myshoes_list
{
$tag = '<option value="%s">%s</option>';
$root = XCube_Root::getSigleton();
$handler = Legacy_Utils::getModuleHandler('page', 'shoes');
$cri = Xcck_Utils::getListCriteria('shoes');
$cri->add(new Criteria('uid', $root->mContext->mXoopsUser->get('uid')));
$objs = $handler->getObjects($cri);
$options = "";
foreach ($objs as $obj) {
$options .= sprintf($tag, $obj->getShow('page_id'), $obj->getShow('title'));
}
return $options;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment