We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is:
Quickly set cell styles. It may not be perfect. I am a newbie and hope to help everyone.
<?php /** * set cellStyle * @param integer $x Number of columns spanned 0-no columns spanned * @param integer $y background 0-No background 1-gray 2-blue 3-red 4-blue 5-Dark gray * @param integer $z restart or continue 0-no vMerge 1-restart 2-continue * @param integer $q boderWidth default-10 0 no boderWidth */ function setTable($x=0,$y=0,$z=0,$q=10) { if($x == 0 && $y == 0 && $z == 0 && $q == 0) { return $tableStyle = ['valign' => 'center',]; } else if($x == 0 && $y == 0 && $z == 0 ) { return $tableStyle = ['borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center']; } else if($x == 0 && $y == 4 && $z == 0) { return $tableStyle = ['borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center','bgColor' => 'yellow']; }else if($x == 0 && $y == 5 && $z == 0) { return $tableStyle = ['borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center','bgColor' => '#BFBFBF']; } else if($x == 0 && $y == 3 && $z == 0) { return $tableStyle = ['borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center','bgColor' => 'red']; } else if($x == 0 && $y == 2 && $z == 0) { return $tableStyle = ['borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center','bgColor' => '#9cc2e5']; }else if($x == 0 && $y == 1 && $z == 0) { return $tableStyle = ['borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center','bgColor' => '#EEECE1']; } else if($x > 0 && $y == 0 && $z == 0) { return $tableStyle = ['borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center','gridSpan' => $x]; } else if($x > 0 && $y == 2 && $z == 0) { return $tableStyle = ['borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center','bgColor' => '#9cc2e5','gridSpan' => $x]; }else if($x > 0 && $y == 5 && $z == 0) { return $tableStyle = ['borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center','bgColor' => '#BFBFBF','gridSpan' => $x]; }else if($x > 0 && $y == 1 && $z == 0) { return $tableStyle = ['borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center','bgColor' => '#EEECE1','gridSpan' => $x]; } else if($x == 0 && $y == 0 && $z== 1 ) { return $tableStyle = ['vMerge' => 'restart','borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center']; } else if($x == 0 && $y == 1 && $z== 1 ) { return $tableStyle = ['vMerge' => 'restart','borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center','bgColor' => '#EEECE1']; } else if($x == 0 && $y == 0 && $z== 2 ) { return $tableStyle = ['vMerge' => 'continue','borderTopSize' => $q, 'borderBottomSize' => $q, 'borderLeftSize' => $q, 'borderRightSize' => $q, 'valign' => 'center',]; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is:
Expected Behavior
Quickly set cell styles.
It may not be perfect. I am a newbie and hope to help everyone.
How to Reproduce
Context
The text was updated successfully, but these errors were encountered: