Exemplo n.º 1
0
Arquivo: index.php Projeto: truffo/eep
 private function trash_list()
 {
     $params = false;
     $asCount = false;
     $trashObjects = eZContentObjectTrashNode::trashList($params, $asCount);
     eep::displayNodeList($trashObjects, "Garbage Nodes");
 }
Exemplo n.º 2
0
Arquivo: index.php Projeto: truffo/eep
 private function listSubtree($subtreeNodeId, $additional)
 {
     $title = "All nodes in subtree [" . $subtreeNodeId . "]";
     $params["Depth"] = 0;
     $params["IgnoreVisibility"] = true;
     $params["Limitation"] = array();
     if (isset($additional["limit"])) {
         if (0 != $additional["limit"]) {
             $params["Limit"] = $additional["limit"];
             $title .= " (Limit=" . $params["Limit"] . ")";
         }
     }
     if (isset($additional["offset"])) {
         $params["Offset"] = $additional["offset"];
         $title .= " (Offset=" . $params["Offset"] . ")";
     }
     if (!eepValidate::validateContentNodeId($subtreeNodeId)) {
         throw new Exception("This is not an node id: [" . $subtreeNodeId . "]");
     }
     $allchildren = eZContentObjectTreeNode::subTreeByNodeID($params, $subtreeNodeId);
     eep::displayNodeList($allchildren, $title);
 }
Exemplo n.º 3
0
Arquivo: index.php Projeto: truffo/eep
 private function searchForNodes($parentNodeId, $classIdentifier, $searchString)
 {
     $contentClass = eZContentClass::fetchByIdentifier($classIdentifier);
     if (!$contentClass) {
         throw new Exception("This content class does not exist: [" . $classIdentifier . "]");
     }
     if (!eepValidate::validateContentNodeId($parentNodeId)) {
         throw new Exception("This is not a node id: [" . $parentNodeId . "]");
     }
     $classId = eZContentClass::classIDByIdentifier($classIdentifier);
     $attributeList = eZContentClassAttribute::fetchListByClassID($classId);
     $limit = 100;
     if (isset($additional["limit"])) {
         $limit = $additional["limit"];
     }
     $offset = 0;
     if (isset($additional["offset"])) {
         $offset = $additional["offset"];
     }
     $params["ClassFilterType"] = "include";
     $params["ClassFilterArray"] = array($classIdentifier);
     $params["MainNodeOnly"] = true;
     $params["IgnoreVisibility"] = true;
     $params['Limitation'] = array();
     $params['Offset'] = $offset;
     $params['Limit'] = $limit;
     $searchStringIsNumeric = is_numeric($searchString);
     $numericTypes = array("ezinteger", "ezfloat", "ezdatetime", "ezboolean");
     $params["AttributeFilter"] = array("or");
     foreach ($attributeList as $attribute) {
         $qualifiedAttributeName = $classIdentifier . "/" . $attribute->Identifier;
         // eg folder/name
         // if the string is not numeric and the attribute is numeric, don't
         // search on it -- this is still rough functionality
         if (in_array($attribute->DataTypeString, $numericTypes) && !$searchStringIsNumeric) {
             continue;
         }
         // search on everything else -- maybe a bad idea which generates too
         // many hits ...
         $params["AttributeFilter"][] = array($qualifiedAttributeName, "like", "*" . $searchString . "*");
     }
     $matches = eZContentObjectTreeNode::subTreeByNodeID($params, $parentNodeId);
     $title = "Search on all attributes in '" . $classIdentifier . "' for '" . $searchString . "' from parent " . $parentNodeId;
     eep::displayNodeList($matches, $title);
 }