Example #1
0
 public function setFeatures($features)
 {
     $all_features = Feature::getAll();
     foreach ($all_features as $id => $feature) {
         if ($feature->isEnabled() && in_array($feature, $features)) {
             $feature->enableForUser($this);
         } else {
             $feature->disableForUser($this);
         }
     }
 }
Example #2
0
 (<?php 
        echo UserTools::escape($user_account->getPlan()->getName());
        ?>
)<?php 
        if ($user_account->getUserRole() == Account::ROLE_ADMIN) {
            ?>
 (admin)<?php 
        }
        ?>
</li><?php 
    }
    ?>
	</ul>
	<?php 
}
$features = Feature::getAll();
if (count($features) > 0) {
    ?>
<h2>Features</h2>
	<form action="" method="POST">
	<?php 
    foreach ($features as $id => $feature) {
        ?>
<div<?php 
        if (!$feature->isEnabled()) {
            ?>
 style="text-decoration: line-through"<?php 
        }
        ?>
>
		<input id="feature_<?php