Files
EasySoft-ZenTaoPMS/lib/zin/zui/toggle.func.php
T
2023-07-25 17:42:27 +08:00

26 lines
664 B
PHP

<?php
declare(strict_types=1);
/**
* The zui toggle function file of zin lib.
*
* @copyright Copyright 2023 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @author Hao Sun <sunhao@easycorp.ltd>
* @package zin
* @version $Id
* @link https://www.zentao.net
*/
namespace zin;
/**
* Add data-toggle=* to widget element and set other data attributes.
*
* @param string $name
* @param array $dataset
*/
function toggle($name, $dataset = null): directive
{
if(empty($dataset)) $dataset = array();
$dataset['toggle'] = $name;
return setData($dataset);
}