Skip to content

Commit

Permalink
System: add Section::has
Browse files Browse the repository at this point in the history
  • Loading branch information
esyede committed Aug 16, 2024
1 parent bab9549 commit ae4d3b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions system/section.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ public static function start($section, $content = '')
}
}

/**
* Cek apakah sebuah section ada (dan tidak kosong) atau tidak.
*
* @param string $section
*
* @return bool
*/
public static function has($section)
{
return isset(static::$sections[$section]);
}

/**
* Inject konten inline kedalam section.
* Ini berguna untuk menginjeksi string sederhana seperti judul halaman.
Expand Down

0 comments on commit ae4d3b8

Please sign in to comment.