This repository has been archived on 2024-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
joomla/bin/component_parts/view.sh
2023-06-01 08:20:10 -07:00

27 lines
479 B
Bash

#!/bin/bash
# Check if $name is set
if [[ -z "${name}" ]]; then
echo "Error: Variable \$name is not set. Exiting (displaycontroller.sh)."
exit 1
fi
cat <<EOM > admin/src/View/${name}/HtmlView.php
<?php
namespace harvst\\Component\\${name}\\Administrator\\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
class HtmlView extends BaseHtmlView {
function display(\$tpl = null) {
parent::display(\$tpl);
}
}
EOM