Skip to content

Instantly share code, notes, and snippets.

@jaspertandy
Created September 13, 2013 16:46
Show Gist options
  • Save jaspertandy/6553124 to your computer and use it in GitHub Desktop.
Save jaspertandy/6553124 to your computer and use it in GitHub Desktop.
in method visible_columns()
$default_hide = array('site_id', 'entry_id', 'complete');
foreach ($default_hide as $hide_me_seymour)
{
if (in_array($hide_me_seymour, $visible_columns))
{
unset(
$visible_columns[
array_search(
$hide_me_seymour,
$visible_columns
)
]
);
}
}
$form_id = ee()->input->get('form_id');
$layout = $this->composer_field_order( $form_id );
if ( $layout ) {
$sorted = array();
$top = array();
foreach ( $visible_columns as $column ) {
preg_match( '#[0-9]+$#' , $column , $match );
if ( $match ) {
$sorted[ array_search( $match[0] , $layout ) ] = $column;
} else {
$top[] = $column;
}
}
ksort( $sorted );
$visible_columns = array_merge( $top , $sorted );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment