Guest User

Untitled

a guest
Jul 11th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public function hasChildren() {
  2. $sqlQuery = new SQLQuery(
  3. "COUNT('SiteTree_Live'.'ID')", "'SiteTree_Live'", "'ParentID' = ". $this->ID
  4. );
  5. $cnt = (int) $sqlQuery->execute()->value();
  6. return $cnt > 0 ? true : false;
  7. }
Add Comment
Please, Sign In to add comment