Beispiel #1
0
	function sGetVisibleAttributes()
	{
		static $hObj;
		if (empty($hObj))
			$hObj=new LPC_Scaffold_fld_visi();

		$diffVis=$hObj->getDiff(
			get_class($this),
			LPC_Scaffold_fld_visi::MOD_SHOW
		);
		$diffHid=$hObj->getDiff(
			get_class($this),
			LPC_Scaffold_fld_visi::MOD_HIDE
		);

		return
		array_unique(
			array_merge(
				array_diff(
					$this->sGetDefaultVisibleAttributes(),
					$diffHid
				),
				$diffVis
			)
		);
	}
Beispiel #2
0
	"</p>");

$p->a("<p>"._LH('scaffoldingColumnVisibilityExplain')."</p>");

$obj=new $class();
$allAttrs=$obj->sGetAllAttributes();
$visAttrs=$obj->sGetVisibleAttributes();
$defAttrs=$obj->sGetDefaultVisibleAttributes();

if (!empty($_POST['diff'])) {
	$diff=$_POST['diff'];
	if (empty($_POST['visi'][$diff]))
		$new=false;
	else
		$new=true;
	$sv=new LPC_Scaffold_fld_visi();
	if ($new) {
		if (in_array($diff, $defAttrs))
			$sv->removeForcedVisi($obj, $diff);
		else
			$sv->addForcedVisi($obj, $diff, LPC_Scaffold_fld_visi::MOD_SHOW);
	} else {
		if (in_array($diff, $defAttrs))
			$sv->addForcedVisi($obj, $diff, LPC_Scaffold_fld_visi::MOD_HIDE);
		else
			$sv->removeForcedVisi($obj, $diff);
	}
	header("Location: ".$_SERVER['PHP_SELF']."?c=".get_class($obj));
	exit;
}