Created
February 16, 2017 23:14
-
-
Save lozcalver/59b14e2200288bb650b0ec9d308308e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dataList = $dataList->alterDataQuery(function($dataQuery) { | |
$selectSQL = ''; | |
$alias = ''; | |
// Hack - DataQuery::selectField() is protected in SilverStripe 3 | |
// $dataQuery->selectField($selectSQL, $alias); | |
$reflectionMethod = new ReflectionMethod($dataQuery, 'selectField'); | |
$reflectionMethod->setAccessible(true); | |
$reflectionMethod->invoke($dataQuery, $selectSQL, $alias); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment